Skip to content

CASSANDRA-21519: Return CorruptSSTableException if chunk metadata and file size are out of sync - #4975

Closed
nivykani wants to merge 2 commits into
apache:cassandra-6.0from
nivykani:fill-exception-6.0
Closed

CASSANDRA-21519: Return CorruptSSTableException if chunk metadata and file size are out of sync#4975
nivykani wants to merge 2 commits into
apache:cassandra-6.0from
nivykani:fill-exception-6.0

Conversation

@nivykani

@nivykani nivykani commented Jul 30, 2026

Copy link
Copy Markdown

In ThreadLocalReadAheadBuffer, in the rare case that chunk metadata and file size are out of sync (e.g. bytes erased from the file after chunk metadata is calculated), we’d enter an infinite loop.

The proposed fix is to throw a CorruptBlockException if we’re trying to read past the end of a file, rather than clamping the read.

The Cassandra Jira

@maedhroz

maedhroz commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Committed as 793d000

@maedhroz maedhroz closed this Aug 4, 2026
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.

2 participants