activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1511306 - /activemq/trunk/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Date Wed, 07 Aug 2013 13:38:53 GMT
Author: gtully
Date: Wed Aug  7 13:38:53 2013
New Revision: 1511306

URL: http://svn.apache.org/r1511306
Log:
https://issues.apache.org/jira/browse/AMQ-4000 - tracking subscription commands causes a problem
with replay outside of activate - can reset a sub ack locations - regression in AMQ2149Test.
Fixed by ignoring sub add during recovery replay

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

Modified: activemq/trunk/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java?rev=1511306&r1=1511305&r2=1511306&view=diff
==============================================================================
--- activemq/trunk/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
(original)
+++ activemq/trunk/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Wed Aug  7 13:38:53 2013
@@ -1014,6 +1014,14 @@ public abstract class MessageDatabase ex
      */
     void process(JournalCommand<?> data, final Location location, final Location inDoubtlocation)
throws IOException {
         if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >=
0) {
+            if (data instanceof KahaSubscriptionCommand) {
+                KahaSubscriptionCommand kahaSubscriptionCommand = (KahaSubscriptionCommand)data;
+                if (kahaSubscriptionCommand.hasSubscriptionInfo()) {
+                    // needs to be processed via activate and will be replayed on reconnect
+                    LOG.debug("ignoring add sub command during recovery replay:" + data);
+                    return;
+                }
+            }
             process(data, location, (Runnable) null, (Runnable) null);
         } else {
             // just recover producer audit



Mime
View raw message