Change in vdsm[master]: stomp: message tracking do not clean properly

fromani at redhat.com fromani at redhat.com
Tue Nov 24 13:57:33 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: stomp: message tracking do not clean properly
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/48616/3/lib/yajsonrpc/stompreactor.py
File lib/yajsonrpc/stompreactor.py:

Line 325:         try:
Line 326:             destination = self._req_dest[response_id]
Line 327:             del self._req_dest[response_id]
Line 328:         except KeyError:
Line 329:             # we could have no reply-to or we could send events (no message id)
> Because it would trigger log about missing id for any event that is send fr
what about:

  response_id = resp.get("id")
  if response_id is None:
    pass  # do something? either no reply-to or event
  else:
    try:
      destination = self._req_dest[response_id]
      del self._req_dest[response_id]
    except KeyError:
      pass  # maybe now we can log a warning

Furthermore, for a future patch: probably we should split self._req_dest[] and the del self._req_dest[] lookup deserve two separate try/except blocks.
Line 330:             pass
Line 331: 
Line 332:         try:
Line 333:             connections = self._sub_map[destination]


-- 
To view, visit https://gerrit.ovirt.org/48616
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2ca7c7589fea2d7ad5a477123b14df17924fda0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list