-
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] [bookie] Enable reorder read sequence for bk client by default #21652
[improve] [bookie] Enable reorder read sequence for bk client by default #21652
Conversation
What are the possible tradeoffs in using reorderReadSequence? |
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
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
@lhotari It will add more load in reordering the read ensemble due to it is a high-frequency call for each entry reading. But it will be more effective when one bookie is down. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #21652 +/- ##
============================================
+ Coverage 73.20% 73.39% +0.18%
+ Complexity 32744 32652 -92
============================================
Files 1893 1893
Lines 140730 140716 -14
Branches 15500 15499 -1
============================================
+ Hits 103023 103279 +256
+ Misses 29624 29328 -296
- Partials 8083 8109 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Fixes #xyz
Main Issue: #xyz
PIP: #xyz
Motivation
If one ledger's ensemble is [bk0, bk1] and bk0 is down, the bookie client may send a read request to bk0 first then fail with the following errors, and resend the read request to bk1 in the end.
One of the related issues is in the auto-recovery decommission and there is one PR in the BookKeeper repo: apache/bookkeeper#4113
However, the bookie client already knows the bk0 is down and we should send the read request to bk1 first. So we can reorder the read request based on the known bookie list. If one bookie is lost, it will reorder the lost bookie to the end of the read list.
Modifications
Enable the
reorderReadSequence
by default for bookie client in broker and auto-recovery.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: