activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r545289 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
Date Thu, 07 Jun 2007 20:00:38 GMT
Author: chirino
Date: Thu Jun  7 13:00:37 2007
New Revision: 545289

URL: http://svn.apache.org/viewvc?view=rev&rev=545289
Log:
Fix for the DefaultStoreXARecoveryBrokerTest test failure.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?view=diff&rev=545289&r1=545288&r2=545289
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
Thu Jun  7 13:00:37 2007
@@ -175,14 +175,26 @@
             }
         },"ActiveMQ Journal Checkpoint Worker");
         createTransactionStore();
-        if(referenceStoreAdapter.isStoreValid()==false){
-            log.warn("The ReferenceStore is not valid - recovering ...");
-            recover();
-            log.info("Finished recovering the ReferenceStore");
-        }else {
-            Location location=writeTraceMessage("RECOVERED "+new Date(),true);
-            asyncDataManager.setMark(location,true);
-        }
+        
+//
+// The following was attempting to reduce startup times by avoiding the log 
+// file scanning that recovery performs.  The problem with it is that XA transactions
+// only live in transaction log and are not stored in the reference store, but they still
+// need to be recovered when the broker starts up.  Perhaps on a graceful shutdown we 
+// should record all the in flight XA transactions to a file to avoid having to scan 
+// the entire transaction log.  For now going to comment this bit out.        
+//        
+//        if(referenceStoreAdapter.isStoreValid()==false){
+//            log.warn("The ReferenceStore is not valid - recovering ...");
+//            recover();
+//            log.info("Finished recovering the ReferenceStore");
+//        }else {
+//            Location location=writeTraceMessage("RECOVERED "+new Date(),true);
+//            asyncDataManager.setMark(location,true);
+//        }
+        
+        recover();
+        
         // Do a checkpoint periodically.
         periodicCheckpointTask=new Runnable(){
 



Mime
View raw message