reddycharan commented on a change in pull request #677: Issue 659: Fix 
Checkpoint logic in SortedLedgerStorage
URL: https://github.com/apache/bookkeeper/pull/677#discussion_r153379651
 
 

 ##########
 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:
   1) @sijie you misunderstood me. I mean to say do we need to have this 
overridden method in SortedLedgerStorage? Yes, ofcourse for persistence 
InterleavedLedgerStorage's checkpoint should be called and I'm not questioning 
that. My question is why do we need to call "memTable.flush(this, checkpoint);" 
again? memtable.flush is already called in onSizeLimitReached method, which is 
the caller for this method.
   
   2) If you agree with my previous point, then you would get why I'm saying 
this 'checkpoint' argument is not needed for checkpoint method and hence we can 
remove the argument all together from the method declaration in LedgerStorage 
interface.

----------------------------------------------------------------
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

Reply via email to