thetumbled commented on code in PR #24430:
URL: https://github.com/apache/pulsar/pull/24430#discussion_r2165656824


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/InMemoryDelayedDeliveryTracker.java:
##########
@@ -221,14 +230,13 @@ public NavigableSet<Position> getScheduledMessages(int 
maxMessages) {
     @Override
     public CompletableFuture<Void> clear() {
         this.delayedMessageMap.clear();
+        this.delayedMessagesCount.set(0);

Review Comment:
   Hi, Lari. I have created a pr to check this. But i think it should not be 
set to 0 because of the posibility of concurrent execution. If there is another 
thread that adding a message into the map  after the check `if 
(delayedMessageMap.isEmpty()) {`, it should not be zero, right?
   I think we have better keep it unchanged, just leave a warn log.



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