sijie commented on a change in pull request #889: BP-14 Implementation of
WriteFlag.DEFERRED_SYNC on Journal
URL: https://github.com/apache/bookkeeper/pull/889#discussion_r161958353
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -959,19 +979,31 @@ public void run() {
}
journalFlushWatcher.reset().start();
bc.flush(false);
+
+ for (int i = 0; i < toFlush.size(); i++) {
Review comment:
also I think I had a comment before : it's better not to put this loop in
between
line 981: `bc.flush(false);` and
line 992: `lastFlushPosition = bc.position();`.
because there is a timer `journalFlushWatcher` that calculating the time
spending on flushing. consider moving down to just before `if (syncData) {`. so
all the stats/timer are correct as expected and easier to understand what
metrics are measuring what logic.
----------------------------------------------------------------
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