activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6063
Date Wed, 25 Nov 2015 16:03:33 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 35b7ac250 -> 8f30866fd


https://issues.apache.org/jira/browse/AMQ-6063

Fixing potential NullPointerException during KahaDB index recovery.


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

Branch: refs/heads/master
Commit: 8f30866fdf89f25188a358f1b1c161b2f06de3f5
Parents: 35b7ac2
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Wed Nov 25 16:02:52 2015 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Wed Nov 25 16:02:52 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/activemq/blob/8f30866f/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 85e25d0..cd9067d 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
@@ -762,12 +762,14 @@ public abstract class MessageDatabase extends ServiceSupport implements
BrokerSe
 
             for (Long sequenceId : matches) {
                 MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
-                sd.locationIndex.remove(tx, keys.location);
-                sd.messageIdIndex.remove(tx, keys.messageId);
-                metadata.producerSequenceIdTracker.rollback(keys.messageId);
-                undoCounter++;
-                decrementAndSubSizeToStoreStat(key, keys.location.getSize());
-                // TODO: do we need to modify the ack positions for the pub sub case?
+                if (keys != null) {
+                    sd.locationIndex.remove(tx, keys.location);
+                    sd.messageIdIndex.remove(tx, keys.messageId);
+                    metadata.producerSequenceIdTracker.rollback(keys.messageId);
+                    undoCounter++;
+                    decrementAndSubSizeToStoreStat(key, keys.location.getSize());
+                    // TODO: do we need to modify the ack positions for the pub sub case?
+                }
             }
         }
 


Mime
View raw message