activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [2/8] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5354 - patch applied with thanks
Date Thu, 18 Dec 2014 03:17:35 GMT
https://issues.apache.org/jira/browse/AMQ-5354 - patch applied with thanks


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

Branch: refs/heads/activemq-5.10.x
Commit: c682f91946c51ddcfa044aa06f41a74a4c22f83b
Parents: d7e65a3
Author: gtully <gary.tully@gmail.com>
Authored: Mon Sep 15 15:59:00 2014 +0100
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Wed Dec 17 21:44:52 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/activemq/blob/c682f919/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 755f214..337e188 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
@@ -1332,13 +1332,16 @@ public abstract class MessageDatabase extends ServiceSupport implements
BrokerSe
 
         Long id = sd.messageIdIndex.get(tx, command.getMessageId());
         if (id != null) {
-            sd.orderIndex.put(
+            MessageKeys previousKeys = sd.orderIndex.put(
                     tx,
                     command.getPrioritySupported() ? command.getPriority() : javax.jms.Message.DEFAULT_PRIORITY,
                     id,
                     new MessageKeys(command.getMessageId(), location)
             );
             sd.locationIndex.put(tx, location, id);
+            if(previousKeys != null) {
+                sd.locationIndex.remove(tx, previousKeys.location);
+            }
         } else {
             LOG.warn("Non existent message update attempt rejected. Destination: {}://{},
Message id: {}", command.getDestination().getType(), command.getDestination().getName(), command.getMessageId());
         }


Mime
View raw message