DataStax Help Center

"Validation failed" when running a nodetool repair



A "validation failed" was seen when running a repair


When the user attempted to run a repair, the following exception was seen in the /var/log/cassandra/system.log

 INFO [AntiEntropyStage:1] 2015-06-05 07:13:34,981 (line 161) [repair #610799a0-0b52-11e5-b97e-b7a7c52693de] requesting merkle trees for mytable (to [/, /, ip-10-
ERROR [ValidationExecutor:48] 2015-06-05 07:13:34,990 (line 242) Failed creating a merkle tree for [repair #610799a0-0b52-11e5-b97e-b7a7c52693de on myks/mytable, (-1282988750579997629,-1185701225543990938]], / (see log for details)
ERROR [ValidationExecutor:48] 2015-06-05 07:13:34,990 (line 199) Exception in thread Thread[ValidationExecutor:48,1,main]
java.lang.RuntimeException: Cannot get comparator 1 in org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type). This might due to a mismatch between the schema and the data read
        at org.apache.cassandra.db.marshal.CompositeType.getComparator(
        at org.apache.cassandra.db.marshal.CompositeType.getComparator(
        at org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(
        at org.apache.cassandra.db.ColumnFamily.addColumn(
        at org.apache.cassandra.db.ColumnFamily.addAtom(
        at org.apache.cassandra.db.compaction.PrecompactedRow.merge(
        at org.apache.cassandra.db.compaction.PrecompactedRow.<init>(
        at org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(
        at org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(
        at org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(
        at org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(
        at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(
        at org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(
        at org.apache.cassandra.db.compaction.CompactionManager.access$600(
        at org.apache.cassandra.db.compaction.CompactionManager$
at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at Caused by: java.lang.IndexOutOfBoundsException: index (1) must be less than size (1) at at at at org.apache.cassandra.db.marshal.CompositeType.getComparator( ... 23 more


It appears that some corruption had occurred to an sstable. It was originally reported in the following Cassandra jira:


There are two tools: "nodetool scrub" and "sstablescrub", it is best to run the former first. If that is not successful then run the latter.

Run a nodetool scrub on the on the table:

If nodetool scrub does not finish successfully then use the offline sstablescrub:

Note: sstablescrub should be run with DSE offline (i.e. the DSE service is not running on the node where you are running sstable scrub)

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk