You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "void-ptr974 (via GitHub)" <gi...@apache.org> on 2026/07/19 12:07:40 UTC
[PR] Fix DbLedgerStorage checkpoint comparison with multiple journals [bookkeeper]
void-ptr974 opened a new pull request, #4844:
URL: https://github.com/apache/bookkeeper/pull/4844
### Motivation
`CheckpointSourceList` samples each journal checkpoint independently. When a periodic checkpoint overlaps a DbLedgerStorage cache-pressure flush, the two aggregate checkpoints can be incomparable, for example `[2, 1]` and `[1, 2]`.
The existing lexicographic comparison treats the first checkpoint as newer and can skip a required DbLedgerStorage flush even though it does not cover the second journal.
### Changes
- Add a strict coverage comparison for checkpoints while preserving the existing total `compareTo` ordering.
- Compare aggregate checkpoints component by component.
- Use coverage comparison for the DbLedgerStorage checkpoint skip decision.
- Add unit coverage for aggregate checkpoint ordering and a DbLedgerStorage regression test.
### Tests
- `mvn -pl bookkeeper-server -Dtest=CheckpointSourceListTest,DbLedgerStorageTest,BookieMultipleJournalsTest,SyncThreadTest,EntryMemTableTest -DfailIfNoTests=false test`
- `mvn -pl bookkeeper-server -DskipTests checkstyle:check spotless:check apache-rat:check`
- `mvn -pl bookkeeper-server -DskipTests -Dspotbugs.onlyAnalyze=org.apache.bookkeeper.bookie.CheckpointSource,org.apache.bookkeeper.bookie.CheckpointSourceList,org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage spotbugs:check`
--
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: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix skipped checkpoint flushes that can cause data loss in multi-journal DbLedgerStorage [bookkeeper]
Posted by "StevenLuMT (via GitHub)" <gi...@apache.org>.
StevenLuMT commented on PR #4844:
URL: https://github.com/apache/bookkeeper/pull/4844#issuecomment-5117592873
rerun failure checks
--
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: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org