gtully commented on code in PR #4659:
URL: https://github.com/apache/activemq-artemis/pull/4659#discussion_r1392707143


##########
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java:
##########
@@ -517,7 +517,6 @@ public void removeRolledback(MessageReference 
messageReference) {
    }
 
    public void addRolledback(MessageReference messageReference) {
-      currentWindow.decrementAndGet();

Review Comment:
   in testRedeliveredMessageNotOverflowingPrefetch: currentWindow goes negative 
and message 14 does not arrive! the logic that puts messaged back on the 
delivered list and pulls from the transaction is in the mix here. That list has 
11 messages, prefetch + the one rolled back message. I think currentWindow 
should only be decremented by the 1 rolledback message. 
   This is very tricky, but it the root problem may be that there is a single 
transaction now, doing the rollback of the client message and the prefetched 
messages.



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