Skip to content

CASSANDRA-19988: Direct IO support for background reads - #5143

Open
cheeeee wants to merge 1 commit into
apache:trunkfrom
cheeeee:CASSANDRA-19988-trunk
Open

CASSANDRA-19988: Direct IO support for background reads#5143
cheeeee wants to merge 1 commit into
apache:trunkfrom
cheeeee:CASSANDRA-19988-trunk

Conversation

@cheeeee

@cheeeee cheeeee commented Sep 10, 2026

Copy link
Copy Markdown

Status: changes requested — not ready to merge

The published setting does not reach streaming readers despite advertising streaming coverage.

Verification correction

Earlier descriptions overstated correctness and/or test coverage. Those claims are withdrawn. AI-assisted source review has been performed; this is not maintainer approval. Previously mixed build artifacts are not accepted as verification evidence. Corrective changes and clean, targeted verification are in progress; the published head has not yet been replaced.

Published head under review: cd631b47c77a05f8663d60db0ac62640c1265735.

In Cassandra 5.0, Direct I/O support was added for background writes
(background_write_disk_access_mode) and compaction reads (compaction_read_disk_access_mode).
However, other sequential background read operations (Scrub, Verify, SAI and Accord
index builds, streaming) still hardcoded buffered I/O, causing massive Page Cache
pollution and kicking out hot cached user data when scanning multi-gigabyte SSTables.

This patch:
1. Config: introduces background_read_disk_access_mode with @Replaces for
   backward-compatibility with compaction_read_disk_access_mode.
2. DatabaseDescriptor: resolves background_read_disk_access_mode and preserves
   deprecated compaction_read_disk_access_mode accessors as delegates.
3. SSTableReader: adds openDataReader(DiskAccessMode, RateLimiter) overload.
4. SortedTableScrubber & SortedTableVerifier: plumb background_read_disk_access_mode
   into data reader creation so nodetool scrub and verify respect Direct I/O.
5. SecondaryIndexBuilders: plumb background_read_disk_access_mode into SAI and
   Accord index rebuild scans.

Fixes: CASSANDRA-19988
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant