apache/cassandra · error · IOException

Invalid large Columns subset: missing index ${idx} of ${supe

Error message

Invalid large Columns subset: missing index ${idx} of ${supersetCount}

What it means

Thrown by UnfilteredDescriptor.readMissingColumnIndexes when deserializing the 'missing columns' delta list of a large-columns subset: an index read from the stream is negative or >= the superset column count. Like the present-index check, it indicates the serialized column bitmap on disk cannot be valid for the declared superset, i.e. corrupted or mismatched SSTable data.

Source

Thrown at src/java/org/apache/cassandra/io/sstable/UnfilteredDescriptor.java:229

        {
            int idx = dataReader.readUnsignedVInt32();
            if (idx < 0 || idx >= supersetCount)
                throw new IOException("Invalid large Columns subset: present index " + idx + " of " + supersetCount);
            presentColumnsWords[idx >>> 6] |= 1L << (idx & 63);
        }
    }

    /** The last word starts trimmed to the column range. A delta of 0 clears nothing. */
    private void readMissingColumnIndexes(RandomAccessReader dataReader, int supersetCount, int nWords, int delta) throws IOException
    {
        java.util.Arrays.fill(presentColumnsWords, 0, nWords, -1L);
        if ((supersetCount & 63) != 0)
            presentColumnsWords[nWords - 1] = -1L >>> (64 - (supersetCount & 63));
        for (int i = 0; i < delta; i++)
        {
            int idx = dataReader.readUnsignedVInt32();
            if (idx < 0 || idx >= supersetCount)
                throw new IOException("Invalid large Columns subset: missing index " + idx + " of " + supersetCount);
            presentColumnsWords[idx >>> 6] &= ~(1L << (idx & 63));
        }
    }

    public void resetUnfiltered()
    {
        resetClustering();
        position = 0;
        flags = 0;
        extendedFlags = 0;
        unfilteredSize = 0;
        unfilteredDataStart = 0;
        prevUnfilteredSize = 0;
        rowColumns = null;
        missingColumnsMask = 0;
        useColumnsWords = false;
    }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Run nodetool scrub / sstablescrub on the table to validate and quarantine the corrupt file
  2. Restore the SSTable from a snapshot/backup and repair the range with nodetool repair
  3. Use sstableverify to identify the bad component and remove it so it can be re-rebuilt from replicas
  4. Verify schema/serialization-header consistency; upgrade path issues may need recompacting with the current version
Defensive patterns

Strategy: try-catch

Validate before calling

// validate file integrity before deserialization
sstableverify <keyspace> <table>
sstablemetadata <data.db file>

Try / catch

try { readRow(...); }
catch (CorruptSSTableException | IOException e) {
    quarantine(sstable); // move to bad/, then nodetool scrub + repair
}

Prevention

When it happens

Trigger: Reading an SSTable row with the large-columns subset encoding where the trailing missing-index vints fall outside [0, supersetCount): truncated or corrupt data.db bytes, or a serialization-header/column-count mismatch between the file and the table schema.

Common situations: Corrupt or partially flushed SSTables; mixing SSTables across versions or schema snapshots; failed compaction left a bad file; manual file edits or bad restore.

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/26c2e98784cfbf15. Report an issue: GitHub.