cshannon commented on code in PR #2231:
URL: https://github.com/apache/activemq/pull/2231#discussion_r3616963504


##########
activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java:
##########
@@ -3848,12 +3848,34 @@ MessageKeys put(Transaction tx, int priority, Long key, 
MessageKeys value) throw
             }
         }
 
+        /**
+         * Iterate and record the last visited sequence keys
+         * (lastDefaultKey/lastHighKey/lastLowKey) so that a subsequent
+         * {@link #stoppedIterating()} advances the destination cursor past the
+         * visited messages.
+         */
         Iterator<Entry<Long, MessageKeys>> iterator(Transaction tx) throws 
IOException{
-            return new MessageOrderIterator(tx,cursor,this);
+            return new MessageOrderIterator(tx,cursor,this,true);
         }
 
         Iterator<Entry<Long, MessageKeys>> iterator(Transaction tx, 
MessageOrderCursor m) throws IOException{
-            return new MessageOrderIterator(tx,m,this);
+            return new MessageOrderIterator(tx,m,this,true);

Review Comment:
   Or maybe we update the recovery() method to not track the last keys either. 
Either way, it seems like we should either be isolated or not and the 4 methods 
includes a weird hybrid option of partial isolation



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to