-
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
[fix][broker] Avoid block markDeletePosition forward when skip lost entries #21210
Conversation
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.
overall LGTM.
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
Show resolved
Hide resolved
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
/pulsarbot rerun-failure-checks |
/pulsarbot rerun-failure-checks |
The pr had no activity for 30 days, mark with Stale label. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21210 +/- ##
============================================
+ Coverage 73.57% 74.45% +0.87%
- Complexity 32624 35113 +2489
============================================
Files 1877 1945 +68
Lines 139502 147483 +7981
Branches 15299 16276 +977
============================================
+ Hits 102638 109802 +7164
- Misses 28908 29217 +309
- Partials 7956 8464 +508
Flags with carried forward coverage won't be shown. Click here to find out more.
|
# Conflicts: # managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorTest.java
If you have time, please help me take a look, thank you very much. @Technoboy- @poorbarcode |
# Conflicts: # managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorTest.java
Motivation
The configuration autoSkipNonRecoverableData is designed to turn this feature on if we can accept partial data loss. When some entries is lost, the broker will still work.
cursor.readPosition
will move to next position for skip these positions. But now we have this problem:cursor.readPosition
can move to next positition, but thecursor.markDeletePosition
can not forward.for example:
The root cause is: When entries lost, lost entries not be delete from cursor.
Modifications
When skip lost entries, delete these entries from cursor.
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: hanmz#4