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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Oct 1 11:16:57 EDT 2007


Author: cctrieloff
Date: 2007-10-01 11:16:57 -0400 (Mon, 01 Oct 2007)
New Revision: 958

Modified:
   store/trunk/cpp/lib/BdbMessageStore.cpp
Log:
skip reading db for m-id log when using journal

Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp	2007-10-01 14:46:01 UTC (rev 957)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp	2007-10-01 15:16:57 UTC (rev 958)
@@ -547,6 +547,9 @@
     std::set<string> prepared;
     collectPreparedXids(prepared);
 
+	txn_lock_map enqueues;
+ 	txn_lock_map dequeues;
+	//when using the async journal, it will abort unprepaired xids and populate the locked maps
 	if (!usingJrnl()){
     	std::set<string> known;
     	readXids(enqueueXidDb, known);
@@ -559,17 +562,14 @@
         	    completed(txn, dequeueXidDb, enqueueXidDb);
         	}
     	}
+	    readLockedMappings(enqueueXidDb, enqueues);
+ 	    readLockedMappings(dequeueXidDb, dequeues);
 	}
-    txn_lock_map enqueues;
-    txn_lock_map dequeues;
+
+  	for (std::set<string>::iterator i = prepared.begin(); i != prepared.end(); i++) {
+  	    txns.push_back(new PreparedTransaction(*i, enqueues[*i], dequeues[*i]));
+  	}
 	
-	//this will be empty when using the journal -- TODO to get from journal.
-    readLockedMappings(enqueueXidDb, enqueues);
-    readLockedMappings(dequeueXidDb, dequeues);
-
-    for (std::set<string>::iterator i = prepared.begin(); i != prepared.end(); i++) {
-        txns.push_back(new PreparedTransaction(*i, enqueues[*i], dequeues[*i]));
-    }
 }
 
 void BdbMessageStore::readXids(Db& db, std::set<string>& xids)




More information about the rhmessaging-commits mailing list