apache/cassandra · critical · CorruptSSTableException
Unfiltered clustering in index does not match data:{info=
Error message
Unfiltered clustering in index does not match data:{info= What it means
Thrown during extended verification when the clustering key of the unfiltered row deserialized from the data file does not match the firstName recorded for that indexInfo entry in the row index. Index and data content disagree, indicating corruption.
Source
Thrown at src/java/org/apache/cassandra/io/sstable/format/big/BigTableVerifier.java:160
{
IndexInfo indexInfo = indexInfoRetriever.columnsIndex(blockIndex);
if (outputHandler.isDebugEnabled()) outputHandler.debug("indexInfo %s", indexInfo.toString(sstable.metadata()));
long dataFileOffset = partitionBase + indexInfo.offset;
if (expectedNextOffset != 0)
{
if (expectedNextOffset != indexInfo.offset)
throw new CorruptSSTableException(new IOException("Row entry indexInfo offset + width should match next block offset:" + indexInfo.offset + " expected: " + expectedNextOffset), it.toString());
}
expectedNextOffset = indexInfo.offset + indexInfo.width;
dataFile.seek(dataFileOffset);
Unfiltered unfiltered = UnfilteredSerializer.serializer.deserialize(dataFile,
sstable.header,
deserializationHelper,
BTreeRow.sortedBuilder());
if (!Objects.equals(indexInfo.firstName, unfiltered.clustering()))
throw new CorruptSSTableException(new IOException("Unfiltered clustering in index does not match data:{info=" + indexInfo.toString(sstable.metadata()) + ", row:" + unfiltered.clustering().toString(sstable.metadata()) + "}"), it.toString());
if (comparator.compare(indexInfo.firstName, indexInfo.lastName) > 0)
throw new CorruptSSTableException(new IOException("First name is > Last name:{info=" + indexInfo.toString(sstable.metadata()) + "}"), it.toString());
}
}
}
// The verifier checks that the partition key/position in the index and data match, here we waant to verify
// the entries clustering keys match.
while (it.advance()); // no-op, just check if index is readable
if (!Objects.equals(key, sstable.getLast().getKey()))
throw new CorruptSSTableException(new IOException("Last partition does not match index"), it.toString());
}
if (options.extendedVerification)
dataFile.reset();
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Scrub the SSTable or delete it and repair the affected token range from replicas
- Restore the SSTable from a clean backup
- Verify disk/filesystem health (fsck, SMART)
Defensive patterns
Strategy: validation
Try / catch
try { verifier.verify(); }
catch (CorruptSSTableException e) { logger.error("Index/data clustering mismatch in {}", e.getFilename()); repairRange(keyspace, table); } Prevention
- Avoid raw copies of live SSTables
- Verify after any file-level restore
- Maintain replicas and run regular nodetool repair so corrupted SSTables can be replaced
- Check disk for silent corruption
When it happens
Trigger: `nodetool verify` (extendedVerification) where deserializing the row at partitionBase+indexInfo.offset yields a clustering different from indexInfo.firstName.
Common situations: Truncated or corrupted Data.db from crashes or disk issues; SSTables manually copied while being written; filesystem corruption.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- First partition does not match index
- Row entry indexInfo offset + width should match next block o
- First name is > Last name:{info=
- Last partition does not match index
- Corrupt flags value for clustering prefix (isStatic flag set
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/404abf0a0d56c15c.
Report an issue: GitHub.