Bug 919017
| Summary: | XML exchange does not update statistics when no binding key matches routing key | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Pavel Moravec <pmoravec> | ||||||||||
| Component: | qpid-cpp | Assignee: | Ernie <eallen> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Leonid Zhaldybin <lzhaldyb> | ||||||||||
| Severity: | medium | Docs Contact: | |||||||||||
| Priority: | medium | ||||||||||||
| Version: | 2.3 | CC: | esammons, iboverma, jross, lzhaldyb, rbinkhor, sauchter | ||||||||||
| Target Milestone: | 3.0 | Keywords: | Patch, TestCaseProvided | ||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | |||||||||||||
| 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 15:07:03 UTC | Type: | Bug | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Bug Depends On: | |||||||||||||
| Bug Blocks: | 785156 | ||||||||||||
| Attachments: |
|
||||||||||||
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. 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.
Created attachment 712007 [details]
Slightly modified patch to compile on current trunk
Was reviewed and approved.
Created attachment 781348 [details]
Tar file containing test program source and test execution script.
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 |
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.