Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 919017 - XML exchange does not update statistics when no binding key matches routing key
XML exchange does not update statistics when no binding key matches routing key
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
2.3
Unspecified Unspecified
medium Severity medium
: 3.0
: ---
Assigned To: Ernie
Leonid Zhaldybin
: Patch, TestCaseProvided
Depends On:
Blocks: 785156
  Show dependency treegraph
 
Reported: 2013-03-07 07:18 EST by Pavel Moravec
Modified: 2014-11-09 17:39 EST (History)
6 users (show)

See Also:
Fixed In Version: qpid-cpp-0.22-2
Doc Type: Bug Fix
Doc Text:
It was discovered that doRoute(msg, b) was not called when the routing key of a message did not match the binding key of an XML exchange. This caused the QMF statistics msgIn, msgDrop, byteIn and byteDrop to incorrectly update. The fix calls doRoute(...) even if the routing key and binding key do not match. The QMF statistics now update as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-24 11:07:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
reproducer (1.32 KB, text/x-python)
2013-03-07 07:19 EST, Pavel Moravec
no flags Details
Simple patch proposal (1.17 KB, patch)
2013-03-11 10:32 EDT, Pavel Moravec
no flags Details | Diff
Slightly modified patch to compile on current trunk (1.14 KB, patch)
2013-03-18 10:41 EDT, Ernie
no flags Details | Diff
Tar file containing test program source and test execution script. (974 bytes, application/x-gzip)
2013-07-31 16:12 EDT, Irina Boverman
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA QPID-4658 None None None Never
Red Hat Product Errata RHEA-2014:1296 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.0 Release 2014-09-24 15:00:06 EDT

  None (edit)
Description Pavel Moravec 2013-03-07 07:18:00 EST
Description of problem:
If no binding key for a XML exchange matches the routing key of incoming message, then QMF statistics of the exchange are not updated - while msgIn, msgDrop, byteIn and byteDrop should be updated.


Version-Release number of selected component (if applicable):
0.18-14


How reproducible:
100%


Steps to Reproduce:
(using attached script - see    ssn.sender("myxml/weather_wrong; ..    differs from   rxaddr += 'key: weather, '   and thus the message is to be dropped)
service qpidd restart
python xml_exchange_test.py
qpid-stat -e | egrep '(xchang|=|myxml)'

  
Actual results:
Exchanges
  exchange            type     dur  bind  msgIn  msgOut  msgDrop  byteIn  byteOut  byteDrop
  ===========================================================================================
  myxml               xml              1     0      0       0        0       0        0


Expected results:
Exchanges
  exchange            type     dur  bind  msgIn  msgOut  msgDrop  byteIn  byteOut  byteDrop
  ===========================================================================================
  myxml               xml              1     1      0       1      172       0      172


Additional info:
This BZ assumes XML exchange runs xquery only for the bindings with binding key matching routing key of the message being processed - something I dont see a reason for, as the xquery should decide alone if the binding matches or not.
Comment 1 Pavel Moravec 2013-03-07 07:19:15 EST
Created attachment 706551 [details]
reproducer

Slightly modified example from https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/2/html-single/Messaging_Programming_Reference/index.html#sect-XML_Exchange - just routing key in sent message is different.
Comment 2 Pavel Moravec 2013-03-11 10:32:42 EDT
Created attachment 708424 [details]
Simple patch proposal

If bindingsMap[routingKey].snapshot() is null, dont return XmlExchange::route() immediatelly but let call doRoute(msg, b); for empty BindingList b - it will just count the stats.

Not sure if RWlock::ScopedRlock l(lock); makes further sense now, though.
Comment 4 Ernie 2013-03-18 10:41:03 EDT
Created attachment 712007 [details]
Slightly modified patch to compile on current trunk

Was reviewed and approved.
Comment 5 Justin Ross 2013-03-18 15:23:29 EDT
-> POST

http://svn.apache.org/viewvc?view=revision&revision=1457924
Comment 7 Irina Boverman 2013-07-31 16:12:27 EDT
Created attachment 781348 [details]
Tar file containing test program source and test execution script.
Comment 11 errata-xmlrpc 2014-09-24 11:07:03 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1296.html

Note You need to log in before you can comment on or make changes to this bug.