poorbarcode commented on code in PR #18227:
URL: https://github.com/apache/pulsar/pull/18227#discussion_r1010766576


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -583,6 +583,9 @@ protected synchronized boolean 
trySendMessagesToConsumers(ReadType readType, Lis
         if (needTrimAckedMessages()) {
             cursor.trimDeletedEntries(entries);
         }
+        if (readType == ReadType.Replay) {
+            entries.removeIf(entry -> 
!redeliveryMessages.contains(entry.getLedgerId(), entry.getEntryId()));
+        }

Review Comment:
   I have modified the test to make that the probability of problem occuring is 
greater than 50%.



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