-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]Dispatcher did unnecessary sort for recentlyJoinedConsumers and printed noisy error logs #24634
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]Dispatcher did unnecessary sort for recentlyJoinedConsumers and printed noisy error logs #24634
Conversation
…ers and printed noisy errorlogs
…ers and printed noisy error logs
.../pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersClassic.java
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24634 +/- ##
============================================
- Coverage 74.38% 74.10% -0.28%
- Complexity 32808 33351 +543
============================================
Files 1881 1893 +12
Lines 146843 147781 +938
Branches 16866 17091 +225
============================================
+ Hits 109222 109520 +298
- Misses 28964 29500 +536
- Partials 8657 8761 +104
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ers and printed noisy error logs (#24634)
|
@poorbarcode please backport to branch-3.0 and branch-3.3 |
…ers and printed noisy error logs (apache#24634) (cherry picked from commit c2940b3)
…ers and printed noisy error logs (apache#24634)
…ers and printed noisy error logs (apache#24634) (cherry picked from commit c2940b3)
…ed noisy error logs (#24634)
I've handled backporting to branch-3.0 in commit b505a0f |
…ed noisy error logs (#24634)
…ed noisy error logs (apache#24634)
…ers and printed noisy error logs (#24634)
…ed noisy error logs (apache#24634) (cherry picked from commit b505a0f)
…ed noisy error logs (apache#24634) (cherry picked from commit b505a0f)
…ers and printed noisy error logs (apache#24634)
…ers and printed noisy error logs (apache#24634)
Motivation
#23795 improved the method
recentlyJoinedConsumers: rather than check ordering for all items, just check the latest two because the method will be called after addition for all consumers.The method
sortRecentlyJoinedConsumersIfNeededhas a bug; it did an unnecessary sorting for the collectionrecentlyJoinedConsumers, and printed noisy logsThe items in recentlyJoinedConsumers are out-of-order.For example:
3items:[1, 2, 3]posPre->1posPre->null;posAfter->2posPre->3; Since the variableposPreis null , skip to set the variableposAfterModifications
Fix the issue.
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x