You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2015/09/10 14:14:01 UTC

activemq git commit: https://issues.apache.org/jira/browse/AMQ-5960 - durable sub pendingQueueSize after force shutdown - fix npe test failure

Repository: activemq
Updated Branches:
  refs/heads/master d1dface01 -> f4a2543de


https://issues.apache.org/jira/browse/AMQ-5960 - durable sub pendingQueueSize after force shutdown - fix npe test failure


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/f4a2543d
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/f4a2543d
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/f4a2543d

Branch: refs/heads/master
Commit: f4a2543def0d7240fc97f850a53f6be48dc74562
Parents: d1dface
Author: Dejan Bosanac <de...@nighttale.net>
Authored: Thu Sep 10 14:12:59 2015 +0200
Committer: Dejan Bosanac <de...@nighttale.net>
Committed: Thu Sep 10 14:13:45 2015 +0200

----------------------------------------------------------------------
 .../org/apache/activemq/store/kahadb/MessageDatabase.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/f4a2543d/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
index 5240b75..815b9df 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
@@ -1348,10 +1348,12 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
             sd.locationIndex.put(tx, location, previous);
             metadata.lastUpdate = location;
             // remove ack positions
-            Iterator<Entry<String, SequenceSet>> it = sd.ackPositions.iterator(tx);
-            while (it.hasNext()) {
-                Entry<String, SequenceSet> entry = it.next();
-                entry.getValue().remove(id);
+            if (sd.subscriptions != null && !sd.subscriptions.isEmpty(tx)) {
+                Iterator<Entry<String, SequenceSet>> it = sd.ackPositions.iterator(tx);
+                while (it.hasNext()) {
+                    Entry<String, SequenceSet> entry = it.next();
+                    entry.getValue().remove(id);
+                }
             }
 
         }