| Summary: | session statistics Tx* not updated any time | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Pavel Moravec <pmoravec> | ||||||
| Component: | qpid-cpp | Assignee: | Pavel Moravec <pmoravec> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Petra Svobodová <psvobodo> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 2.3 | CC: | freznice, jross, psvobodo | ||||||
| Target Milestone: | 3.1 | Keywords: | EasyFix, Patch, TestCaseProvided | ||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | qpid-cpp-0.30-2 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2015-04-14 13:46:59 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: | |||||||
| Attachments: |
|
||||||||
Correcting mis-calculations in reproducer:
qpid-send -m 20 -a "myQueue; {create:always}" --tx 2 --rollback-frequency 2
should generate:
TxnCommits:6, TxnCount:11, TxnRejects:5, TxnStarts:1
(10 transactions, every 2nd rejected, plus one extra at the end)
Created attachment 792176 [details]
Patch proposal
Patch based on 0.22-4 code as I dont suppose backport to 0.18/2.3 branch.
Guessing that TxnStarts counter stands for number of tx.select messages sent on the session, the counter can be at most one.
Guessing that TxnCount=TxnCommits+TxnRejects.
Based on that, see attached patch.
The patch does not calculate DTX transactions as I was unable to match DTX methods to the stats.
Created attachment 793641 [details]
Improved patch proposal
Based on gsim's advice, I moved the statistics update from SemanticsState to SessionState, to get rid of the re-casting issue. SemanticState just calls the SessionState methods updating the stats directly.
Commited in r1520245. The session statistics are dynamicly updated now. Verified on version qpid-cpp-0.30-7 on Rhel 6.6 (i686 in x86_64) and on Rhel 7.1 x86_64. --VERIFIED 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-0805.html |
Description of problem: Tx* counters of Session QMF object are everytime zero, regardless if transactions are/have been used or not. Version-Release number of selected component (if applicable): qpid-cpp-0.18-17 (also seen in 0.22) How reproducible: 100% Steps to Reproduce: echo "log-to-file=/tmp/qpidd.log" > /etc/qpidd.conf echo "auth=no" >> /etc/qpidd.conf echo "trace=yes" >> /etc/qpidd.conf rm -rf /tmp/qpidd.log service qpidd restart qpid-send -m 20 -a "myQueue; {create:always}" --tx 2 --rollback-frequency=50 sleep 10 grep Tx /tmp/qpidd.log | grep session (optionally, check the the session statistics in qpid-tool) Actual results: 2013-08-30 10:22:38 [Model] trace Mgmt delete session. id:18f9a28a-f5b0-4e9d-9fe7-dc49a1463e6a Statistics: {TxnCommits:0, TxnCount:0, TxnRejects:0, TxnStarts:0, clientCredit:0, unackedMessages:0} 2013-08-30 10:22:38 [Management] trace Deleting V2 map={_create_ts:1377850955102035092, _delete_ts:1377850955109735713, _object_id:{_agent_epoch:1, _object_name:org.apache.qpid.broker:session:18f9a28a-f5b0-4e9d-9fe7-dc49a1463e6a}, _schema_id:{_class_name:session, _hash:1aaa08d0-c118-ff78-0956-47b9ac9c6849, _package_name:org.apache.qpid.broker, _type:_data}, _update_ts:1377850955102035092, _values:{TxnCommits:0, TxnCount:0, TxnRejects:0, TxnStarts:0, attached:False, channelId:1, clientCredit:0, connectionRef:{_agent_epoch:1, _object_name:org.apache.qpid.broker:connection:127.0.0.1:5672-127.0.0.1:52255}, detachedLifespan:0, name:18f9a28a-f5b0-4e9d-9fe7-dc49a1463e6a, unackedMessages:0, vhostRef:{_object_name:org.apache.qpid.broker:vhost:org.apache.qpid.broker:broker:amqp-broker,/}}} See "TxnCommits:0, TxnCount:0, TxnRejects:0, TxnStarts:0" in both trace logs / qpid-tool Expected results: TxnCommits:5, TxnCount:10, TxnRejects:5, TxnStarts:0 (TxnStarts!=0 only if there is some started but not commited/rejected transaction - test case is obvious though not trivial) Additional info: See partially relevant bz1002605.