Bug 1002952
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: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Pavel Moravec
2013-08-30 10:38:52 UTC
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 |