-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Restore the behavior to dispatch batch messages according to consumer permits #24092
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
[fix][broker] Restore the behavior to dispatch batch messages according to consumer permits #24092
Conversation
…ng to consumer permits
lhotari
left a comment
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.
Thanks for spotting this regression @BewareMyPower. I added one suggestion.
.../java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
Outdated
Show resolved
Hide resolved
32019f4 to
3ca7df6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #24092 +/- ##
============================================
+ Coverage 73.57% 74.18% +0.61%
+ Complexity 32624 32427 -197
============================================
Files 1877 1863 -14
Lines 139502 144312 +4810
Branches 15299 16457 +1158
============================================
+ Hits 102638 107063 +4425
+ Misses 28908 28773 -135
- Partials 7956 8476 +520
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
lhotari
left a comment
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
…ng to consumer permits (apache#24092) (cherry picked from commit 2f6345d) (cherry picked from commit 2fb9cb5)
…ng to consumer permits (apache#24092) (cherry picked from commit 2f6345d) (cherry picked from commit 2fb9cb5)
…ng to consumer permits (apache#24092) (cherry picked from commit 2f6345d) (cherry picked from commit 2fb9cb5)
…ng to consumer permits (apache#24092)
Fixes #23825
Motivation
It seems that the PIP-379 breaks #7266. For example, given the following configs:
When
subscriptionSharedUseClassicPersistentImplementationis false (by default), 10 entries will be dispatched to the consumer. When it's true (the behavior before 4.0), only 1 entry will be dispatched to the consumer.Modifications
Fix the
maxEntriesInThisBatchcalculation inPersistentDispatcherMultipleConsumers. IntestBatchMessageDispatchingAccordingToPermits, wait until the entries are dispatched to consumers. Then this test would fail without this fix.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: