jbonofre commented on code in PR #1142:
URL: https://github.com/apache/activemq/pull/1142#discussion_r1463426575


##########
activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java:
##########
@@ -1545,8 +1545,9 @@ long updateIndex(Transaction tx, KahaAddMessageCommand 
command, Location locatio
         if (previous == null) {
             previous = sd.messageIdIndex.put(tx, command.getMessageId(), id);
             if (previous == null) {
-                incrementAndAddSizeToStoreStat(tx, command.getDestination(), 
location.getSize());
                 sd.orderIndex.put(tx, priority, id, new 
MessageKeys(command.getMessageId(), location));

Review Comment:
   Shouldn't we use the `IndexLock` here to have the `orderIndex` and store 
stat updated atomically ? Just wondering.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to