thetumbled commented on code in PR #24430:
URL: https://github.com/apache/pulsar/pull/24430#discussion_r2158449561
##########
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:
There is no need to do that, these logic is used for feature
`fixedDelayDetectionLookahead`.
```
if (delayedMessageMap.isEmpty()) {
// Reset to initial state
highestDeliveryTimeTracked = 0;
messagesHaveFixedDelay = true;
}
```
When the `delayedMessageMap` is empty, the value of `delayedMessagesCount`
must be 0; otherwise, there are other issues that need to be resolved.
--
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]