[
https://issues.apache.org/jira/browse/CASSANDRA-9140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14502604#comment-14502604
]
Stefania commented on CASSANDRA-9140:
-------------------------------------
I prepared a patch for trunk and one for 2.0 since there is an issue in
{{CompressedRandomAccessReader}} that is only on trunk and since the test
compression parameters loading is different on trunk. Then I noticed that the
merge from 2.0 to 2.1 was not straightforward either and so I saved the 2.1
patch as well, all attached as links.
The main change, other than {{testScrubCorruptedCounterRow()}} itself, is to
make the scrub algorithm keep on seeking to partition positions read from the
index rather than giving up at the second attempt, since when a compression
chunk is corrupted many partitions will be lost, not just one.
Also, I don't think it's right to assume that the key read from the data file
is correct when it is different from the key read from the index, because in
case of corrupted data we would most likely read junk. In fact the existing
test, {{testScrubCorruptedCounterRow()}}, was passing just because we would try
to read beyond the file end and therefore end up with a null key due to the EOF
exception. When I increased the number of partitions in the test (without
compression), it started to report one empty row and one bad row, rather than
just one bad row.
[~thobbs], let me know if you can take this review or if we need to find
someone else.
> Scrub should handle corrupted compressed chunks
> -----------------------------------------------
>
> Key: CASSANDRA-9140
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9140
> Project: Cassandra
> Issue Type: Improvement
> Components: Tools
> Reporter: Tyler Hobbs
> Assignee: Stefania
> Fix For: 2.0.15, 2.1.5
>
>
> Scrub can handle corruption within a row, but can't handle corruption of a
> compressed sstable that results in being unable to decompress a chunk. Since
> the majority of Cassandra users are probably running with compression
> enabled, it's important that scrub be able to handle this (likely more
> common) form of sstable corruption.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)