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_r153373234
 
 

 ##########
 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) do we really need this method? the actual caller of this method is 
SortedLedgerStorage.onSizeLimitReached..in that method 
"memTable.flush(SortedLedgerStorage.this);" is already called after getting 
'checkpoint'. I dont see the need of calling memTable.flush(this, checkpoint); 
again here. 
   2) we can remove this method from SortedLedgerStorage class and also we can 
remove the argument - 'checkpoint' for LedgerStorage.checkpoint method
   

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