[rhmessaging-commits] rhmessaging commits: r3199 - store/trunk/cpp/lib.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Mar 23 12:51:47 EDT 2009


Author: kpvdr
Date: 2009-03-23 12:51:46 -0400 (Mon, 23 Mar 2009)
New Revision: 3199

Modified:
   store/trunk/cpp/lib/JournalImpl.cpp
Log:
Correction to logic for management txn depth monitoring

Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp	2009-03-23 15:17:27 UTC (rev 3198)
+++ store/trunk/cpp/lib/JournalImpl.cpp	2009-03-23 16:51:46 UTC (rev 3199)
@@ -367,7 +367,7 @@
 
     if (_mgmtObject != 0)
     {
-        if (txn_incr)
+        if (!txn_incr) // If this xid was not in _tmap, it will be now...
             _mgmtObject->inc_txn();
         _mgmtObject->inc_enqueues();
         _mgmtObject->inc_txnEnqueues();
@@ -385,7 +385,7 @@
 
     if (_mgmtObject != 0)
     {
-        if (txn_incr)
+        if (!txn_incr) // If this xid was not in _tmap, it will be now...
             _mgmtObject->inc_txn();
         _mgmtObject->inc_enqueues();
         _mgmtObject->inc_txnEnqueues();
@@ -409,10 +409,14 @@
 void
 JournalImpl::dequeue_txn_data_record(data_tok* const dtokp, const std::string& xid, const bool txn_coml_commit)
 {
+    bool txn_incr = _mgmtObject != 0 ? _tmap.in_map(xid) : false;
+
     handleIoResult(jcntl::dequeue_txn_data_record(dtokp, xid, txn_coml_commit));
 
     if (_mgmtObject != 0)
     {
+        if (!txn_incr) // If this xid was not in _tmap, it will be now...
+            _mgmtObject->inc_txn();
         _mgmtObject->inc_dequeues();
         _mgmtObject->inc_txnDequeues();
         _mgmtObject->dec_recordDepth();




More information about the rhmessaging-commits mailing list