poorbarcode opened a new pull request, #4613:
URL: https://github.com/apache/bookkeeper/pull/4613
### Motivation
**Background**
- `ReadOnlyLedgerHandle` opened without `doRecovery`, in other words, it has
not been closed yet, its metadata in memory will be updated once modified.
- `ReadOnlyLedgerHandle` opened without `doRecovery`, in other words, it has
been closed; its metadata in memory will never be updated
**Issue**
- The ledger's metadata can also be modified by the auto-recovery component.
- There is a scenario in which a ledger handle always gets the error
org.apache.bookkeeper.client.BKException$BKBookieHandleNotAvailableException:
Bookie handle is not available` after multiple decommissions. The reproduction
steps are as follows
- Client service opens a read-only ledger handle, which has been closed.
- All BKs that relate to the ledger have been decommissioned.
- Auto recovery component moved the data into other BK instances who is
alive.
- The ledger handle in the client memory keeps connecting to the BKs who
are in the original ensemble set, and the connection will always fail.
- You can reproduce the issue with the new test
`testOpenedLedgerHandleStillWorkAfterDecommissioning`
### Changes
Provide a new API to open a read-only ledger handle with
`keepUpdateMetadata`, the ledger's metadata in memory will be updated
automatically after the auto-recovery component updates it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]