-
Notifications
You must be signed in to change notification settings - Fork 955
[fix] Failed read entries after multiple decommissioning #4613
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
base: master
Are you sure you want to change the base?
[fix] Failed read entries after multiple decommissioning #4613
Conversation
I'm curious about is there any cases that the ReadOnlyLedgerHandle cannot accept the updates from metadata server. As I understand, it should always accept the metadata updates no matter "doRecovery" or not. If the Ledger metadata updates to the Ledger which need to be recovered is not expected, we should fix the updates parts. |
Changed the implementation. |
rerun failure checks |
lh = new ReadOnlyLedgerHandle(bk.getClientCtx(), ledgerId, versionedMetadata, digestType, | ||
passwd, !doRecovery); | ||
passwd, true); |
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.
When doing recovery, it is also a metadata update operation. So it doesn't allow watching the metadata update. Maybe there is a race condition risk if we always get the metadata updated from two places.
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.
Added a new parameter to update metadata automatically, we can set the new parameter to true if needed, and it does not affect other use cases
Motivation
Background
ReadOnlyLedgerHandle
opened withoutdoRecovery
, in other words, it has not been closed yet, its metadata in memory will be updated once modified.ReadOnlyLedgerHandle
opened withdoRecovery
, in other words, it has been closed or it will be closed; its metadata in memory will never be updatedIssue
testOpenedLedgerHandleStillWorkAfterDecommissioning
Changes
Let Bookie
LedgerHandle
always accept the metadata updates, no matter "doRecovery" or not.Provide a new API to open a read-only ledger handle withkeepUpdateMetadata
, the ledger's metadata in memory will be updated automatically after the auto-recovery component updates it.