apache/cassandra · warning

Index is unreadable, scrubbing will continue without index.

Error message

Index is unreadable, scrubbing will continue without index.

What it means

sstable.scrubPartitionsIterator() threw while creating the partition iterator over the BTI index. The scrubber logs the throwable and returns null so scrubbing continues without an index-driven iterator, iterating the data file directly instead.

Solutions

  1. Let scrub proceed without the index, then run `nodetool repair` to fix data from replicas
  2. Replace the sstable entirely from a healthy replica (preferable to a degraded scrub)
  3. Verify sstable format version compatibility with the running Cassandra version
  4. Inspect disk I/O health and system logs for underlying hardware faults

Example fix

// before: iterator open fails, scrub degrades silently
outputHandler.warn(t, "Index is unreadable, scrubbing will continue without index.");
// after: restore a healthy sstable before scrub
nodetool repair keyspace table; // replaces corrupt sstable
nodetool scrub keyspace table;  // scrub now has a valid index
Defensive patterns

Strategy: try-catch

Try / catch

try {
    return sstable.scrubPartitionsIterator();
} catch (Throwable t) {
    logger.warn("Index unreadable; scrubbing without index", t);
    return null;
}

Prevention

When it happens

Trigger: openIndexIterator (called from BtiTableScrubber constructor) catches any Throwable from scrubPartitionsIterator — unreadable index blocks, I/O errors, or deserialization failures while setting up the partition iterator.

Common situations: Severely corrupt -PartitionIndex.db, corrupt index metadata segments, disk I/O errors during open, version mismatch between sstable format and the running Cassandra.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/io/sstable/format/bti/BtiTableScrubber.java:84

            this.indexIterator = hasIndexFile
                                 ? openIndexIterator()
                                 : null;
        }
        catch (RuntimeException ex)
        {
            outputHandler.warn("Detected corruption in the index file - cannot open index iterator", ex);
        }
    }

    private ScrubPartitionIterator openIndexIterator()
    {
        try
        {
            return sstable.scrubPartitionsIterator();
        }
        catch (Throwable t)
        {
            outputHandler.warn(t, "Index is unreadable, scrubbing will continue without index.");
        }
        return null;
    }

    @Override
    protected UnfilteredRowIterator withValidation(UnfilteredRowIterator iter, String filename)
    {
        return options.checkData && !isIndex ? UnfilteredRowIterators.withValidation(iter, filename) : iter;
    }

    @Override
    public void scrubInternal(SSTableRewriter writer)
    {
        if (indexAvailable() && indexIterator.dataPosition() != 0)
        {
            outputHandler.warn("First position reported by index should be 0, was " +
                               indexIterator.dataPosition() +
                               ", continuing without index.");

View on GitHub (pinned to 88fd0f6a0e)