Sync file ranges of JournalSegmentWriter.flush()
Activity
Show:

Robert Varga March 22, 2024 at 6:49 PM
If is implemented, we should know which index segments have not been modified since last flush(), clamping the "size" argument to FileChannel.force()
JournalSegmentWriter.flush() ends up calling either FileChannel.force() or MappedByteBuffer.force(). In both cases we are telling the OS to figure out what it should actually do.
Since our files are usually grown in a linear fashion, we should be able to track a single window for each file that needs syncing. That in turn will help the OS by clamping the file range it needs to figure out.