CASSANDRA-19988: Direct IO support for background reads - #5143
Open
cheeeee wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.