-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fixed key-shared delivery of messages with interleaved delays #15409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed key-shared delivery of messages with interleaved delays #15409
Conversation
.../java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
} | ||
readMoreEntries(); | ||
return; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only do this in else
part?
It seems replayPosition
could be popped from delayedDeliveryTracker
if minReplayedPosition
is null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jason918 You are absolutely correct, we need to do in both cases. Fixed it
* Fixed key-shared delivery of messages with interleaved delays * Fixed checkstyle * Always add to redelivery messages
…#15409) * Fixed key-shared delivery of messages with interleaved delays * Fixed checkstyle * Always add to redelivery messages
…#15409) * Fixed key-shared delivery of messages with interleaved delays * Fixed checkstyle * Always add to redelivery messages
…#15409) * Fixed key-shared delivery of messages with interleaved delays * Fixed checkstyle * Always add to redelivery messages
…#15409) * Fixed key-shared delivery of messages with interleaved delays * Fixed checkstyle * Always add to redelivery messages
Motivation
Fixes #15397
The changes in #12890 introduced a regression that when delayed messages with interleaved delays occur on a shared subscriptions, many of the messages are not delivered and stay in the backlog.
The reason is that we're peeking into
getMessagesToReplayNow()
and we cannot discard the returned set, because these message ids are not tracked anymore in the delayed messages controller.