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_r153961253
##########
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 nice catch here. I have been looking back to all the historic
changes we made towards SortedLedgerStorage. I think `checkpoint` (originally
known as logMark) as added as a parameter for optimizing skiplist flush, was
originally introduced in
twitter/boookkeeper#159be8dcb2079e30291aa877f3436126f0579a0b . the point 2 you
are raised here is correct for current checkpoint logic.
So for this logic here, I am going to stick to having a `checkpoint` as the
argument to be a safeguard and address the issue at your 2nd point, to be
attributing to original design. I will push a change for it.
----------------------------------------------------------------
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