[ 
https://issues.apache.org/jira/browse/QPID-5107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Moravec updated QPID-5107:
--------------------------------

    Attachment: QPID-5107_debugStats.patch

Chuck's enhancement makes sense, though having the drawback in explicitly 
calling debugStats at the beginning of destructor/closing method of every 
manageable object. As generic Class.cpp destructor can't call debugStats method 
since queue and session stats are already wrong ("over-updated").

Also, as different exchange types might "over-update" statistics in future, I 
decided to call the debugStats() method from individual destructors of all 
exchange types and not from 

QPID_BROKER_INLINE_EXTERN virtual qpid::broker::Exchange::~Exchange();

Attached is a patch for that. It lacks calling debugStats for memory, as the 
class qpid::sys::posix::MemStat does not have management object declared, just 
provided in method argument. Anyway, there is imho no need to fix this as 
memory statistics are empty now (check current trace "Mgmt delete memory. 
id:amqp-broker Statistics: {}").

Leaving both variants of the patches to let upstream to chose.
                
> Trace queue&session deletion statistics show zero values for some counters 
> everytime
> ------------------------------------------------------------------------------------
>
>                 Key: QPID-5107
>                 URL: https://issues.apache.org/jira/browse/QPID-5107
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.22
>            Reporter: Pavel Moravec
>            Priority: Minor
>              Labels: easyfix, easytest, patch
>         Attachments: QPID-5107_debugStats.patch, QPID-5107.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Description of problem:
> qpid trace/logs statistics about object deletion. However some of these data 
> are wrong. In particular msgDepth for a queue is everytime zero (and 
> msgTotalDequeues equals to msgTotalEnqueues despite no consumer was 
> subscribed to the queue), or unackedMessages for a session is zero everytime 
> as well.
> Version-Release number of selected component (if applicable):
> qpid 0.22
> How reproducible:
> 100%
> Steps to Reproduce:
> 1) msgDepth:0 for queue:
> echo "auth=no" > /etc/qpid/qpidd.conf
> echo "trace=yes" >> /etc/qpid/qpidd.conf
> echo "log-to-file=/tmp/qpidd.log" >> /etc/qpid/qpidd.conf
> rm -rf /var/lib/qpidd/* /tmp/qpidd.log
> service qpidd restart
> qpid-send -m 123 -a "testQueue; {create:always, delete:always}"
> sleep 10  # just to let periodic processing to run & print out the stats
> grep "Mgmt delete queue" /tmp/qpidd.log
> Actual results:
> 2013-08-29 14:05:38 [Model] trace Mgmt delete queue. id:testQueue Statistics: 
> {acquires:123, bindingCount:0, bindingCountHigh:0, bindingCountLow:0, 
> byteDepth:0, byteFtdDepth:0, byteFtdDequeues:0, byteFtdEnqueues:0, 
> bytePersistDequeues:0, bytePersistEnqueues:0, byteTotalDequeues:0, 
> byteTotalEnqueues:0, byteTxnDequeues:0, byteTxnEnqueues:0, consumerCount:0, 
> consumerCountHigh:0, consumerCountLow:0, discardsLvq:0, discardsOverflow:0, 
> discardsPurge:0, discardsRing:0, discardsSubscriber:0, discardsTtl:0, 
> flowStopped:False, flowStoppedCount:0, messageLatencyAvg:0, 
> messageLatencyCount:0, messageLatencyMax:0, messageLatencyMin:0, msgDepth:0, 
> msgFtdDepth:0, msgFtdDequeues:0, msgFtdEnqueues:0, msgPersistDequeues:0, 
> msgPersistEnqueues:0, msgTotalDequeues:123, msgTotalEnqueues:123, 
> msgTxnDequeues:0, msgTxnEnqueues:0, releases:0, reroutes:0, 
> unackedMessages:0, unackedMessagesHigh:0, unackedMessagesLow:0}
> Expected results:
> acquires:0
> msgTotalDequeues:0
> (several other counters are supposed to be wrong as well like byteFtdDequeues)
> 2) Reproducer for unackedMessages:0 for session:
> qpid-send -m 11 -a "myQueue; {create:always}"
> qpid-receive -m 100 -a "myQueue; {create:always}" -f
> (in another terminal)
> qpid-tool
> list connection
> call <ID_of_qpid-receive-connection> close
> and now check result:
> grep Tx /tmp/qpidd.log | grep session
> should return "unackedMessages:11" but returns zero.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to