eolivelli commented on code in PR #2983:
URL: https://github.com/apache/bookkeeper/pull/2983#discussion_r933235867
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -385,8 +385,8 @@ public int process(boolean shouldForceWrite) throws
IOException {
this.logFile.forceWrite(false);
journalStats.getJournalSyncStats()
.registerSuccessfulEvent(MathUtils.elapsedNanos(startTime),
TimeUnit.NANOSECONDS);
+ lastLogMark.setCurLogMark(this.logId,
this.lastFlushedPosition);
}
- lastLogMark.setCurLogMark(this.logId,
this.lastFlushedPosition);
Review Comment:
I think that we can reach this point in some cases when there is no need to
`force`
for instance here
https://github.com/apache/bookkeeper/blob/63867a99bac7df6e41b71e55af06ac514bd43113/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java#L524
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -385,8 +385,8 @@ public int process(boolean shouldForceWrite) throws
IOException {
this.logFile.forceWrite(false);
journalStats.getJournalSyncStats()
.registerSuccessfulEvent(MathUtils.elapsedNanos(startTime),
TimeUnit.NANOSECONDS);
+ lastLogMark.setCurLogMark(this.logId,
this.lastFlushedPosition);
}
- lastLogMark.setCurLogMark(this.logId,
this.lastFlushedPosition);
Review Comment:
do you see any code path in which we arrive here and the journal has not
been flushed and fsync'd ?
--
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]