You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "zymap (via GitHub)" <gi...@apache.org> on 2023/03/02 02:36:59 UTC

[GitHub] [bookkeeper] zymap commented on a diff in pull request #3830: Simplified the logic for ForceWriteThread after we introduced queue.drainTo()

zymap commented on code in PR #3830:
URL: https://github.com/apache/bookkeeper/pull/3830#discussion_r1122536754


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -534,11 +484,26 @@ public void run() {
                         requestsCount = 1;
                     }
 
+                    journalStats.getForceWriteQueueSize().addCount(-requestsCount);
+
+                    // Sync and mark the journal up to the position of the last entry in the batch
+                    ForceWriteRequest lastRequest = localRequests.get(requestsCount - 1);
+                    syncJournal(lastRequest);

Review Comment:
   Is it possible that there have two log files in the batch?



-- 
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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org