activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1303128 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Date Tue, 20 Mar 2012 20:10:59 GMT
Author: tabish
Date: Tue Mar 20 20:10:59 2012
New Revision: 1303128

URL: http://svn.apache.org/viewvc?rev=1303128&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3775

Ensure that the orderIndex is reset to a good state. 

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java?rev=1303128&r1=1303127&r2=1303128&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Tue Mar 20 20:10:59 2012
@@ -1333,6 +1333,7 @@ public abstract class MessageDatabase ex
             if (sd.subscriptions.isEmpty(tx)) {
                 sd.messageIdIndex.clear(tx);
                 sd.locationIndex.clear(tx);
+                sd.orderIndex.clear(tx);
             }
         }
     }
@@ -2541,6 +2542,14 @@ public abstract class MessageDatabase ex
             }
         }
 
+        void clear(Transaction tx) throws IOException {
+            this.remove(tx);
+            this.resetCursorPosition();
+            this.allocate(tx);
+            this.load(tx);
+            this.configureLast(tx);
+        }
+
         void remove(Transaction tx) throws IOException {
             defaultPriorityIndex.clear(tx);
             defaultPriorityIndex.unload(tx);



Mime
View raw message