Skip to content

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

Open
nivykani wants to merge 1 commit into
apache:cassandra-5.0from
nivykani:fill-exception-5.0
Open

CASSANDRA-21519: Return CorruptSSTableException if chunk metadata and file size are out of sync#4976
nivykani wants to merge 1 commit into
apache:cassandra-5.0from
nivykani:fill-exception-5.0

Conversation

@nivykani

Copy link
Copy Markdown

(Same change as #4937, adding to the 5.0 branch)

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

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