djsweet opened a new pull request, #4902: URL: https://github.com/apache/bookkeeper/pull/4902
Descriptions of the changes in this PR: Main Issue: #4900 Note that there is a separate issue, #4895, that must be addressed for this to function correctly when ledger metadata is in use. ### Motivation The root cause of #4900 is that `SortedLedgerStorage` ignores `EntryMemTable` when getting the LAC. This PR updates `SortedLedgerStorage` so that the LAC is read from `EntryMemTable` if it is missing in the `LedgerCache`. ### Changes - In `EntryMemTable`, expose a `getLastAddConfirmed` that functions similar to `InterleavedLedgerStorage.getLastAddConfirmed`. - Refactor `InterleavedLedgerStorage.getLastAddConfirmed` to expose `getLastAddConfirmedFromLedgerEntry`, the LAC reading case where the LAC is not present in the Ledger Cache - In `SortedLedgerStorage.getLastAddConfirmed`, first explicitly try to read the LAC from `InterleavedLedgerStorage`'s `LedgerCache`. If the LAC isn't present in the ledger cache, read it from the `EntryMemTable`. If the LAC isn't present in the `EntryMemTable`, read it from `InterleavedLedgerStorage` directly, bypassing the `LedgerCache`. -- 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]
