activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1004600 - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
Date Tue, 05 Oct 2010 10:15:32 GMT
Author: gtully
Date: Tue Oct  5 10:15:32 2010
New Revision: 1004600

URL: http://svn.apache.org/viewvc?rev=1004600&view=rev
Log:
resolve issue with page file recovery replaying write buffer at wrong offest, also have schedualler
flush writes on new store creation, issue visible with unclean shutdown - https://issues.apache.org/activemq/browse/AMQ-2935

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java
    activemq/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java?rev=1004600&r1=1004599&r2=1004600&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java
Tue Oct  5 10:15:32 2010
@@ -201,6 +201,7 @@ public class JobSchedulerStore extends S
             if (isStarted()) {
                 result.start();
             }
+            this.pageFile.flush();
         }
         return result;
     }

Modified: activemq/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
URL: http://svn.apache.org/viewvc/activemq/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java?rev=1004600&r1=1004599&r2=1004600&view=diff
==============================================================================
--- activemq/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java (original)
+++ activemq/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java Tue Oct  5 10:15:32
2010
@@ -335,7 +335,7 @@ public class PageFile {
                     loadFreeList();
                 } 
             } else {
-                LOG.debug("Recovering page file...");
+                LOG.debug(toString() + ", Recovering page file...");
                 nextTxid.set(redoRecoveryUpdates());
                 
                 // Scan all to find the free pages.
@@ -1107,8 +1107,7 @@ public class PageFile {
         
         // Re-apply all the writes in the recovery buffer.
         for (Map.Entry<Long, byte[]> e : batch.entrySet()) {
-            writeFile.seek(e.getKey());
-            e.getValue();
+            writeFile.seek(toOffset(e.getKey()));
             writeFile.write(e.getValue());
         }
         



Mime
View raw message