Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
In Journal, we process
ForceWriteRequest
with batch as the smallest unit. When we rotate a Journal File, in the forceWriteRequests queue, we may contain a ForceWriteRequest of an old file, and shouldClose is true, and the last ForceWriteRequest in the queue is created by the new Jouranl file. When we batch process fwr, we only sync the last ForceWriteRequest to the disk, so that we can flash the previous fwr data of the file to the disk together. But for old files, when we process the fwr response, we will still processcloseFileIfNecessary
. Here we also sync the Journal files that are waiting for close, but here, we do not updateJournalSyncStats
.