-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[feat][pip] PIP-426: Enable Consumer Throttling and Accurate Unacknowledged Message Tracking for Exclusive and Failover Subscriptions #24396
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
base: master
Are you sure you want to change the base?
Conversation
…onsumer.java Co-authored-by: Lari Hotari <[email protected]>
…ng in cumulative ack mode.
…g_and_cumulative_unacked_stats # Conflicts: # pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumerTest.java
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.
The changes make sense to me, but since this changes the behavior of the existing way exclusive and failover subscriptions currently behave, it will be necessary to write a PIP for this change. One common request has been that when behavior is changed that there's a feature flag which controls whether the old or new behavior is used.
Keeping pending acks state comes with a cost, so that's one reason why it might be useful to turn this feature off to avoid instability when upgrading an existing system.
You could use LLM to draft a PIP by passing
- https://github.com/apache/pulsar/blob/master/pip/README.md
- https://github.com/apache/pulsar/blob/master/pip/TEMPLATE.md
- some example PIPs (such as PIP-379 or PIP-393)
- background issue text and PR description
- PR diff
to the context using a similar approach as https://gist.github.com/lhotari/81f533af4b9ad515e02d96e543c4408b.
After having a draft PIP document, it's easy to revisit it to get it right. Obviously you can just do it manually too. :)
Even before writing a PIP, it could be useful to ask whether this type of change would be acceptable in the community. However, having the PIP document to collect the background could be useful already at this stage. The initial discussion happens on the Pulsar dev mailing list (joining instructions).
Fixes #24159
Main Issue: #24159
Motivation
We can reproduce flow control issue by this unit test
Modifications
pendingAcks
mechanism in theConsumer
class to support exclusive and failover subscriptions.pendingAcks
only works in individual ack mode.PendingAckHandleImpl
for transaction support after removing the dependency onSubscription.isIndividualAckMode
.Verifying this change
This change is already covered by existing tests, such as (please describe tests).
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: