-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][broker] Avoid PersistentReplicator.expireMessages logic compute backlog twice #23957
[improve][broker] Avoid PersistentReplicator.expireMessages logic compute backlog twice #23957
Conversation
…mpute backlog twice
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23957 +/- ##
============================================
+ Coverage 73.57% 74.21% +0.64%
+ Complexity 32624 31888 -736
============================================
Files 1877 1853 -24
Lines 139502 143827 +4325
Branches 15299 16344 +1045
============================================
+ Hits 102638 106741 +4103
+ Misses 28908 28684 -224
- Partials 7956 8402 +446
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…pute backlog twice (apache#23957)
…pute backlog twice (apache#23957) (cherry picked from commit 6db275c) (cherry picked from commit 921b75e)
…pute backlog twice (apache#23957) (cherry picked from commit 6db275c) (cherry picked from commit 127ae84)
…pute backlog twice (apache#23957) (cherry picked from commit 6db275c) (cherry picked from commit 921b75e)
Motivation
Function
cursor.getNumberOfEntriesInBacklog(false)
maybe called twice inPersistentReplicator.expireMessages
.This PR #20416 optimizes similar problems in
PersistentSubscription.expireMessages
.Modifications
Save backlog to variable.
Documentation
doc
doc-required
doc-not-needed
doc-complete