Skip to content

CASSANDRA-21694: Validate CRC before zero-copy streaming sstables (4.0) - #5187

Open
nivykani wants to merge 1 commit into
apache:cassandra-4.0from
nivykani:crc-4.0
Open

nivykani wants to merge 1 commit into
apache:cassandra-4.0from
nivykani:crc-4.0

Conversation

@nivykani

Copy link
Copy Markdown

This patch adds CRC validation on the receiving side, after an entire sstable is received via zero-copy streaming. This detects SSTables that were already corrupt on the sender's disk and prevents them from being accepted, which stops the corruption from spreading.

Since it's possible for the digest component not to be streamed, this check is disabled by default in the config via entire_sstable_stream_digest_validation_enabled, and fails open (if no digest is present, the streaming succeeds).

Validation costs one sequential read of the data file per received SSTable, and any mismatch makes the streaming session fail and increments a metric for entireSSTableDigestMismatches.

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