Skip to content
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

[Bug] Redelivery (replay) queue reads don't get deduplicated, limited by managedLedgerMaxReadsInFlightSizeInMB or cached #23504

Open
3 tasks done
lhotari opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
category/performance Performance issues fix or improvements type/bug The PR fixed a bug or issue reported a bug
Milestone

Comments

@lhotari
Copy link
Member

lhotari commented Oct 23, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version

any released version

Minimal reproduce step

problem description:
This problem applies to Shared and Key_Shared subscriptions.
When a consumer disconnects and while there are other active consumers, the unacknowledged (pending) message ids get added to the redelivery (replay) queue in the dispatcher. When these messages get dispatched on the next round in the Shared or Key_Shared subscription dispatcher, the reads for the messages don't get deduplicated, limited by managedLedgerMaxReadsInFlightSizeInMB or cached. This is a problem for high fanout scenarios for Shared subscriptions, when a large amount of consumers disconnect and reconnect while there's at least one active consumer so that the dispatcher doesn't discard the replay queue and "rewind" in between.

What did you expect to see?

That redelivery reads get deduplicate, limited by managedLedgerMaxReadsInFlightSizeInMB and are eligible for caching

What did you see instead?

PendingReadsManager isn't used, so all reads will be made multiple times to bookkeeper (in fanout with multiple consumers). The reads won't be limited by managedLedgerMaxReadsInFlightSizeInMB and broker cache is by passed.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@lhotari lhotari added type/bug The PR fixed a bug or issue reported a bug category/performance Performance issues fix or improvements labels Oct 23, 2024
@lhotari lhotari added this to the 4.1.0 milestone Oct 23, 2024
@lhotari lhotari self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/performance Performance issues fix or improvements type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

1 participant