You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Pavel Moravec <pm...@redhat.com> on 2013/09/05 16:09:42 UTC

Review Request 14000: QPID-5107 Trace queue&session deletion statistics show zero values for some counters everytime

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14000/
-----------------------------------------------------------

Review request for qpid and Chug Rolke.


Bugs: https://issues.apache.org/jira/browse/QPID-5107
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107


Repository: qpid


Description
-------

qpid trace/logs statistics about object deletion. However some of these data are wrong, if deletion process updates some stats. 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.

See https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107 for two reproducer scenarios (deleting queue and closing session).

The problem is, that the stats are printed in destructor of the QMF object - too late. I propose:
- moving the code to debugStats() method
- call the method from every manageable object at the beginning of its delete/destructor method


Diffs
-----

  /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.h 1520240 
  /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/FanOutExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/HeadersExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1520245 
  /trunk/qpid/cpp/src/qpid/broker/SessionState.cpp 1520245 
  /trunk/qpid/cpp/src/qpid/broker/System.h 1520240 
  /trunk/qpid/cpp/src/qpid/broker/System.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/TopicExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Vhost.h 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Vhost.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp 1520240 

Diff: https://reviews.apache.org/r/14000/diff/


Testing
-------

Successfully tried the patch with both scenarios.


Thanks,

Pavel Moravec


Re: Review Request 14000: QPID-5107 Trace queue&session deletion statistics show zero values for some counters everytime

Posted by Chug Rolke <cr...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14000/#review25959
-----------------------------------------------------------

Ship it!


This change arises from real-world scrutiny of the original print-stats-at-object-deletion strategy. 

- Chug Rolke


On Sept. 6, 2013, 12:56 p.m., Pavel Moravec wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14000/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2013, 12:56 p.m.)
> 
> 
> Review request for qpid and Chug Rolke.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/QPID-5107
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> qpid trace/logs statistics about object deletion. However some of these data are wrong, if deletion process updates some stats. 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.
> 
> See https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107 for two reproducer scenarios (deleting queue and closing session).
> 
> The problem is, that the stats are printed in destructor of the QMF object - too late. I propose:
> - moving the code to debugStats() method
> - call the method from every manageable object at the beginning of its delete/destructor method
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.h 1520240 
>   /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/FanOutExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/HeadersExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1520245 
>   /trunk/qpid/cpp/src/qpid/broker/SessionState.cpp 1520245 
>   /trunk/qpid/cpp/src/qpid/broker/System.h 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/System.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/TopicExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Vhost.h 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Vhost.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp 1520240 
> 
> Diff: https://reviews.apache.org/r/14000/diff/
> 
> 
> Testing
> -------
> 
> Successfully tried the patch with both scenarios.
> 
> 
> Thanks,
> 
> Pavel Moravec
> 
>


Re: Review Request 14000: QPID-5107 Trace queue&session deletion statistics show zero values for some counters everytime

Posted by Pavel Moravec <pm...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14000/
-----------------------------------------------------------

(Updated Sept. 6, 2013, 12:56 p.m.)


Review request for qpid and Chug Rolke.


Changes
-------

Applied Chug's comments.


Bugs: https://issues.apache.org/jira/browse/QPID-5107
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107


Repository: qpid


Description
-------

qpid trace/logs statistics about object deletion. However some of these data are wrong, if deletion process updates some stats. 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.

See https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107 for two reproducer scenarios (deleting queue and closing session).

The problem is, that the stats are printed in destructor of the QMF object - too late. I propose:
- moving the code to debugStats() method
- call the method from every manageable object at the beginning of its delete/destructor method


Diffs (updated)
-----

  /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.h 1520240 
  /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/FanOutExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/HeadersExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1520245 
  /trunk/qpid/cpp/src/qpid/broker/SessionState.cpp 1520245 
  /trunk/qpid/cpp/src/qpid/broker/System.h 1520240 
  /trunk/qpid/cpp/src/qpid/broker/System.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/TopicExchange.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Vhost.h 1520240 
  /trunk/qpid/cpp/src/qpid/broker/Vhost.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp 1520240 
  /trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp 1520240 

Diff: https://reviews.apache.org/r/14000/diff/


Testing
-------

Successfully tried the patch with both scenarios.


Thanks,

Pavel Moravec


Re: Review Request 14000: QPID-5107 Trace queue&session deletion statistics show zero values for some counters everytime

Posted by Chug Rolke <cr...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14000/#review25937
-----------------------------------------------------------



/trunk/qpid/cpp/managementgen/qmfgen/templates/Class.h
<https://reviews.apache.org/r/14000/#comment50634>

    use '(const std::string& comment)' to avoid making string copies



/trunk/qpid/cpp/managementgen/qmfgen/templates/Class.cpp
<https://reviews.apache.org/r/14000/#comment50635>

    This is missing a leading 'void'.
    Also add the const reference like in the .h file.


- Chug Rolke


On Sept. 5, 2013, 2:09 p.m., Pavel Moravec wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14000/
> -----------------------------------------------------------
> 
> (Updated Sept. 5, 2013, 2:09 p.m.)
> 
> 
> Review request for qpid and Chug Rolke.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/QPID-5107
>     https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> qpid trace/logs statistics about object deletion. However some of these data are wrong, if deletion process updates some stats. 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.
> 
> See https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5107 for two reproducer scenarios (deleting queue and closing session).
> 
> The problem is, that the stats are printed in destructor of the QMF object - too late. I propose:
> - moving the code to debugStats() method
> - call the method from every manageable object at the beginning of its delete/destructor method
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.h 1520240 
>   /trunk/qpid/cpp/managementgen/qmfgen/templates/Class.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/FanOutExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/HeadersExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1520245 
>   /trunk/qpid/cpp/src/qpid/broker/SessionState.cpp 1520245 
>   /trunk/qpid/cpp/src/qpid/broker/System.h 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/System.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/TopicExchange.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Vhost.h 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/Vhost.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp 1520240 
>   /trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp 1520240 
> 
> Diff: https://reviews.apache.org/r/14000/diff/
> 
> 
> Testing
> -------
> 
> Successfully tried the patch with both scenarios.
> 
> 
> Thanks,
> 
> Pavel Moravec
> 
>