gaozhangmin commented on code in PR #3353:
URL: https://github.com/apache/bookkeeper/pull/3353#discussion_r908211261


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java:
##########
@@ -820,10 +820,12 @@ private void swapWriteCache() {
     }
 
     @Override
-    public void flush() throws IOException {
+    public void flush(boolean doCheckpointComplete) throws IOException {
         Checkpoint cp = checkpointSource.newCheckpoint();
         checkpoint(cp);
-        checkpointSource.checkpointComplete(cp, true);
+        if (doCheckpointComplete) {

Review Comment:
   In SyncThread,  We can disableCheckpoint, just return without executing 
`checkpointSource.checkpointComplete(checkpoint, false);` I don't think this is 
strange.



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java:
##########
@@ -820,10 +820,12 @@ private void swapWriteCache() {
     }
 
     @Override
-    public void flush() throws IOException {
+    public void flush(boolean doCheckpointComplete) throws IOException {
         Checkpoint cp = checkpointSource.newCheckpoint();
         checkpoint(cp);
-        checkpointSource.checkpointComplete(cp, true);
+        if (doCheckpointComplete) {

Review Comment:
   In SyncThread,  We can disableCheckpoint, just return without executing 
`checkpointSource.checkpointComplete(checkpoint, false);` I don't think this is 
strange. @hangc0276 



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

Reply via email to