Sync file ranges of JournalSegmentWriter.flush()

Description

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.

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()

Details

Assignee

Reporter

Labels

Fix versions

Priority

Created March 22, 2024 at 6:47 PM
Updated March 10, 2025 at 12:21 PM