hangc0276 commented on code in PR #3830:
URL: https://github.com/apache/bookkeeper/pull/3830#discussion_r1124308286
##########
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:
+1
It has two bugs:
- Those non-last journal files in the batch won't be removed from OS
PageCache
- That non-last journal files channel in the batch will just call `close`
instead of `fore(false)`, which can't ensure the data is flushed to the disk.
--
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]