It was discovered that when time-to-live (TTL) messages were removed using a purge task, the +acquires+ counter was increased for each broker and queue. Purging the same message by removing it when finding what message to send/acquire to a consumer did not increase the counter. Because TTL purged messages are not technically acquired, this behavior was misleading.
The fix removes code from `Queue.cpp` that counts acquires on `mgmtObject` and `brokerMgmtObject`.
Description of problem:
When purging messages via purge task (that runs every 10 minutes), for every purged message this way, "acquires" counter per queue and per broker is increased.
That does not make much sense, as technically the message is not acquired. Moreover purging the same message in the second way (removing it when finding what message to send/acquire to some consumer) does not increase the counter.
Version-Release number of selected component (if applicable):
qpid-cpp 0.22-49
How reproducible:
100%
Steps to Reproduce:
# echo "queue-purge-interval=10" >> /etc/qpid/qpidd.conf
# service qpidd restart
# qpid-send -a "q; {create:always}" -m1000 --ttl=1000
# sleep 10
# qpid-stat -q q | egrep '(acquires|ttl-expired)'; qpid-stat -g | egrep '(acquires|ttl-expired)'
Actual results:
acquires 1000
discards-ttl-expired 1000
acquires 1008
discards-ttl-expired 1000
(the 2nd acquires - brokerwide - should be >1000 due to the qpid-tool acquiring some messages)
Expected results:
acquires 0
discards-ttl-expired 1000
acquires 8
discards-ttl-expired 1000
(the 2nd acquires - brokerwide - shoudl be >0 due to qpid-tool acquiring some messages, but surely <1000)
Additional info:
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.
https://rhn.redhat.com/errata/RHEA-2015-1879.html
Description of problem: When purging messages via purge task (that runs every 10 minutes), for every purged message this way, "acquires" counter per queue and per broker is increased. That does not make much sense, as technically the message is not acquired. Moreover purging the same message in the second way (removing it when finding what message to send/acquire to some consumer) does not increase the counter. Version-Release number of selected component (if applicable): qpid-cpp 0.22-49 How reproducible: 100% Steps to Reproduce: # echo "queue-purge-interval=10" >> /etc/qpid/qpidd.conf # service qpidd restart # qpid-send -a "q; {create:always}" -m1000 --ttl=1000 # sleep 10 # qpid-stat -q q | egrep '(acquires|ttl-expired)'; qpid-stat -g | egrep '(acquires|ttl-expired)' Actual results: acquires 1000 discards-ttl-expired 1000 acquires 1008 discards-ttl-expired 1000 (the 2nd acquires - brokerwide - should be >1000 due to the qpid-tool acquiring some messages) Expected results: acquires 0 discards-ttl-expired 1000 acquires 8 discards-ttl-expired 1000 (the 2nd acquires - brokerwide - shoudl be >0 due to qpid-tool acquiring some messages, but surely <1000) Additional info: