void-ptr974 opened a new pull request, #4843: URL: https://github.com/apache/bookkeeper/pull/4843
### Motivation DbLedgerStorage checkpoint returned early when the write cache was empty, which skipped ledgerIndex.flush(). Ledger metadata updates such as fenced state and explicitLac can be journaled without pending entry data, so checkpointComplete could advance the journal lastMark before those metadata updates were persisted. ### Changes - Flush the ledger metadata index before returning from an empty-write-cache checkpoint. - Update the shard checkpoint after the metadata-only flush completes. - Add regression tests for fenced state and explicitLac persistence after flush/restart with no pending entries. ### Tests - mvn -pl bookkeeper-server -Dtest=DbLedgerStorageTest#testFlushPersistsFencedMetadataWithoutPendingEntries,DbLedgerStorageTest#testFlushPersistsExplicitLacMetadataWithoutPendingEntries test - mvn -pl bookkeeper-server -Dtest=DbLedgerStorageTest test - mvn -pl bookkeeper-server -DskipTests checkstyle:checkstyle -- 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]
