cassandra/test
samlightfoot 002190748b Support direct I/O for background SSTable writes
Adds an opt-in O_DIRECT write path for background SSTable producers,
bypassing the OS page cache for data that is unlikely to be re-read
soon after being written. Memtable flushes remain buffered.

Enabled via two new YAML knobs:
 - background_write_disk_access_mode: standard (default) | direct
 - direct_write_buffer_size: 1MiB (default; aligned up to FS block
   size, auto-grown to fit a worst-case compressed chunk)

The path is gated by config, table compression being enabled, and an
OperationType allowlist in DataComponent. The allowlist is exhaustive
over OperationType: any new value left unclassified fails static
initialization.

Operations on the DIO path: COMPACTION, MAJOR_COMPACTION,
TOMBSTONE_COMPACTION, ANTICOMPACTION, GARBAGE_COLLECT, CLEANUP,
UPGRADE_SSTABLES, WRITE, STREAM (chunked receiver only), RELOCATE,
UNKNOWN (offline sstablesplit).

Operations off the DIO path:
 - FLUSH (policy: just-flushed data is hot, keep in page cache)
 - SCRUB (correctness: tryAppend needs mark/resetAndTruncate)
 - Zero-Copy Streaming (bypasses DataComponent.buildWriter)
 - Uncompressed writers (only CompressedSequentialWriter has a DIO
   subclass in this change)

StartupChecks fails fast if 'direct' is requested on a platform/FS
that does not support O_DIRECT.

patch by Sam Lightfoot; reviewed by Ariel Weisberg, Dmitry Konstantinov for CASSANDRA-21134
2026-06-24 14:57:46 +01:00
..
anttasks/org/apache/cassandra/anttasks Organize imports and standartize import order across entire codebase 2025-12-30 22:34:14 +01:00
bin Add cursor based optimized compaction path 2025-12-19 12:45:25 -05:00
burn/org/apache/cassandra Avoid ByteBuffer wrapping in cql3.selection.Selector.InputRow to reduce memory allocation rate 2026-06-04 19:19:36 +01:00
conf Support direct I/O for background SSTable writes 2026-06-24 14:57:46 +01:00
data Update 6.0 and 7.0 branches to reflect their versions across the project. 2026-04-21 12:46:11 +02:00
distributed/org/apache/cassandra Support direct I/O for background SSTable writes 2026-06-24 14:57:46 +01:00
harry/main/org/apache/cassandra Accord: Deterministic time integration 2026-05-18 13:19:25 +01:00
long/org/apache/cassandra Implement custom CassandraThread to keep direct references to frequently used thread local objects 2026-06-02 13:56:59 +01:00
memory/org/apache/cassandra/db/compaction Organize imports and standartize import order across entire codebase 2025-12-30 22:34:14 +01:00
microbench/org/apache/cassandra/test/microbench Merge branch 'cassandra-5.0' into cassandra-6.0 2026-06-14 16:50:17 +02:00
resources Offline tool for working with cluster metadata dump files 2026-05-15 14:41:06 +01:00
simulator Introduce AccordExecutorSignalLoop that aims to reduce lock contention: 2026-05-16 21:12:49 +01:00
unit Support direct I/O for background SSTable writes 2026-06-24 14:57:46 +01:00