apache/cassandra · critical · CorruptSSTableException

First name is > Last name:{info=

Error message

First name is > Last name:{info=

What it means

Thrown during extended verification when the indexInfo's firstName (first clustering) is greater than its lastName (last clustering) according to the table's clustering comparator. Since first should be <= last, this indicates a corrupt row-index entry.

Source

Thrown at src/java/org/apache/cassandra/io/sstable/format/big/BigTableVerifier.java:163

                        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();
    }

    private void logDuplicates(DecoratedKey key, Row first, int duplicateRows, long minTimestamp, long maxTimestamp)
    {
        String keyString = sstable.metadata().partitionKeyType.getString(key.getKey());

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Scrub or remove the affected SSTable and repair the range from replicas
  2. Restore from snapshot/backup
  3. Check storage subsystem for silent corruption (enable checksums/bitrot detection)
Defensive patterns

Strategy: validation

Try / catch

try { verifier.verify(); }
catch (CorruptSSTableException e) { logger.error("Corrupt indexInfo in {}", e.getFilename()); scheduleScrub(descriptor); }

Prevention

When it happens

Trigger: `nodetool verify` (extendedVerification) reads an indexInfo block whose firstName/lastName fields are reversed or corrupted, e.g. after bit rot or a truncated write.

Common situations: Hardware/disk corruption; interrupted flush; corrupted SSTable transfer between nodes.

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


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/334997dafc0d9d94. Report an issue: GitHub.