-
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][ml] Filter out deleted entries before read entries from ledger. #21739
Conversation
@dao-jun Please add the following content to your PR description and select a checkbox:
|
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
Outdated
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
Could you please explain more about this line? I don't understand why it pertains to bookie client metadata loss, the disabled auto-recovery and bookies unavailability. |
@codelipenghui @coderzc PTAL |
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21739 +/- ##
=============================================
+ Coverage 36.46% 73.58% +37.11%
- Complexity 12390 32381 +19991
=============================================
Files 1725 1861 +136
Lines 131701 138596 +6895
Branches 14401 15187 +786
=============================================
+ Hits 48027 101985 +53958
+ Misses 77254 28700 -48554
- Partials 6420 7911 +1491
Flags with carried forward coverage won't be shown. Click here to find out more.
|
approve |
I have added the cherry-pick labels since this improvement fixed the issue which can impact the bookies if the cursor rewind to the earlier position (the mark delete position can't move forward due to individual acks). |
…ger. (apache#21739) (cherry picked from commit c66167b) (cherry picked from commit 84ed73e)
…ger. (apache#21739) (cherry picked from commit c66167b) (cherry picked from commit 84ed73e)
PIP: I'm not sure if the PR needs a PIP
Motivation
In #19035 we introduced
skipCondition
before read entries from ledger.It filters out delay-messages for the purpose of optimizing performance: to avoid reading unnecessary entries to save memory usage, network usage and reduce latency of reading entries.
As the same purpose, this PR wants to filter-out deleted entries before reading entries from ledger to optimize performance.
This PR won't change the semantics of
readEntries
, it just made some enhancements.It may brings huge performance optimization in the
individualDelete
mode, especially when bookie client metadata loss, bookie auto-recover disabled and some bookie nodes down.Modifications
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
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: dao-jun#4