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.
Suppose there is another thread that adds a message to the map after the
check `if (delayedMessageMap.isEmpty()) {;` in that case, the value should not
be zero, correct?
I suggest we had better keep it unchanged and only leave a warning 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]