sijie commented on a change in pull request #677: Issue 659: Fix Checkpoint
logic in SortedLedgerStorage
URL: https://github.com/apache/bookkeeper/pull/677#discussion_r153380301
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java
##########
@@ -146,14 +165,9 @@ public ByteBuf getEntry(long ledgerId, long entryId)
throws IOException {
}
@Override
- public Checkpoint checkpoint(final Checkpoint checkpoint) throws
IOException {
- Checkpoint lastCheckpoint = checkpointHolder.getLastCheckpoint();
- // if checkpoint is less than last checkpoint, we don't need to do
checkpoint again.
- if (lastCheckpoint.compareTo(checkpoint) > 0) {
- return lastCheckpoint;
- }
+ public void checkpoint(final Checkpoint checkpoint) throws IOException {
Review comment:
@reddycharan - gotcha. I think my 2nd point at previous comment answered
your question here :)
the `checkpoint` argument is used by the memtable to compare if there are
data is need to flush to entry log files and make it durably stored on entry
log files. it is a safeguard here to ensure we got things right. Also
`Checkpoint.MAX` can be used for triggering fully flush and checkpoint. Hope
this explain your comment.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services