Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug : update lastLogMark after journal file forceWrite #2983

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Contributor

@eolivelli eolivelli Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we can reach this point in some cases when there is no need to force

for instance here we are closing the file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you see any code path in which we arrive here and the journal has not been flushed and fsync'd ?


// Notify the waiters that the force write succeeded
for (int i = 0; i < forceWriteWaiters.size(); i++) {
Expand Down