Make Commitlog flush data safely in Direct IO mode

patch by Maxwell Guo; reviewed by Ariel Weisberg for CASSANDRA-20692
This commit is contained in:
Maxwell Guo 2025-06-17 10:06:38 +08:00
parent a72dcbc86a
commit 8de4c9250e
2 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,5 @@
5.0.5
* Make Commitlog flush data safely in Direct IO mode (CASSANDRA-20692)
* Get SAI MemtableIndex refs before SSTableIndex refs at query time (CASSANDRA-20709)
* Fix MAX_SEGMENT_SIZE < chunkSize in MmappedRegions::updateState (CASSANDRA-20636)
* Full Java 17 support (CASSANDRA-20681)

View File

@ -177,7 +177,12 @@ public class DirectIOSegment extends CommitLogSegment
public DirectIOSegment build()
{
return new DirectIOSegment(segmentManager,
path -> FileChannel.open(path, StandardOpenOption.WRITE, StandardOpenOption.READ, StandardOpenOption.CREATE, ExtendedOpenOption.DIRECT),
path -> FileChannel.open(path,
StandardOpenOption.WRITE,
StandardOpenOption.READ,
StandardOpenOption.CREATE,
StandardOpenOption.DSYNC,
ExtendedOpenOption.DIRECT),
fsBlockSize);
}