Bug 1152032

Summary: purging TTL expired messages via purge task should not increase acquires counters
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: qpid-cppAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Michal Toth <mtoth>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: jross, mtoth, pematous, pmoravec, zkraus
Target Milestone: 3.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qpid-cpp-0.32-1 Doc Type: Bug Fix
Doc Text:
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`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-08 13:09:29 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:

Description Pavel Moravec 2014-10-13 11:24:59 UTC
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:

Comment 1 Pavel Moravec 2014-10-13 14:03:39 UTC
Committed revision 1631396.

Comment 5 Michal Toth 2015-08-04 08:15:02 UTC
Verified using latest packages on rhel 6 32,64 & rhel 7.
qpid-tools-0.34-1
qpid-cpp-server-0.34-1
qpid-cpp-client-0.34-1

Comment 7 errata-xmlrpc 2015-10-08 13:09:29 UTC
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