wenbingshen commented on code in PR #3329:
URL: https://github.com/apache/bookkeeper/pull/3329#discussion_r916071847
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -245,7 +246,8 @@ void readLog() {
}
bb.clear();
mark.readLogMark(bb);
- if (curMark.compare(mark) < 0) {
+ // get the minimum mark position from all the ledger
directories to ensure no data loss.
+ if (curMark.compare(mark) > 0) {
Review Comment:
Since we are now replaying the journal from the smallest LogMark, can we get
the journal log mark position of the current entry to the JournalScanner and
compare it with the checkpoint position on the ledger disk where the entry to
be restored is located, and only restore the entry whose logMark position is
greater than the checkpoint? So as to avoid repeatedly writing the data that
has been flushed to the disk.
--
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]