Skip to content

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

Merged

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented May 1, 2022

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.

Verified

This commit was signed with the committer’s verified signature.
crazy-max CrazyMax
@merlimat merlimat added type/bug The PR fixed a bug or issue reported a bug doc-not-needed Your PR changes do not impact docs release/2.10.1 labels May 1, 2022
@merlimat merlimat added this to the 2.11.0 milestone May 1, 2022
@merlimat merlimat self-assigned this May 1, 2022
Copy link
Contributor

@eolivelli eolivelli left a 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 {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@merlimat merlimat merged commit 2647b32 into apache:master May 2, 2022
merlimat added a commit that referenced this pull request May 2, 2022
* Fixed key-shared delivery of messages with interleaved delays

* Fixed checkstyle

* Always add to redelivery messages
@merlimat merlimat deleted the fix-key-shared-with-interleaved-delays branch May 2, 2022 18:46
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 9, 2022
…#15409)

* Fixed key-shared delivery of messages with interleaved delays

* Fixed checkstyle

* Always add to redelivery messages

(cherry picked from commit 92f5816)
touchkey pushed a commit to sajithsebastian/pulsar that referenced this pull request Mar 30, 2023
…#15409)

* Fixed key-shared delivery of messages with interleaved delays

* Fixed checkstyle

* Always add to redelivery messages
touchkey pushed a commit to sajithsebastian/pulsar that referenced this pull request Mar 30, 2023
…#15409)

* Fixed key-shared delivery of messages with interleaved delays

* Fixed checkstyle

* Always add to redelivery messages
touchkey pushed a commit to sajithsebastian/pulsar that referenced this pull request Mar 30, 2023
…#15409)

* Fixed key-shared delivery of messages with interleaved delays

* Fixed checkstyle

* Always add to redelivery messages
narmathaansp pushed a commit to sajithsebastian/pulsar that referenced this pull request Mar 30, 2023
…#15409)

* Fixed key-shared delivery of messages with interleaved delays

* Fixed checkstyle

* Always add to redelivery messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.8.5 release/2.9.4 release/2.10.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
4 participants