apache/cassandra · warning · IOException

Rebuilding index summary because the effective index…

Error message

Rebuilding index summary because the effective index interval (%d) is higher than the current max index interval (%d)

What it means

Thrown by IndexSummary.deserialize when the summary's sampling level implies an effective index interval greater than the table's configured max_index_interval. Cassandra cannot load such a summary and instead rebuilds the index summary for the sstable.

Solutions

  1. Raise max_index_interval back to a value >= the effective interval in the table schema
  2. Rebuild the index summaries (the exception triggers automatic rebuild, but forcing `nodetool upgradesstables -a ks t` refreshes everything)
  3. Keep min/max_index_interval consistent when restoring sstables between environments

Example fix

// before
ALTER TABLE ks.t WITH max_index_interval = 256;
// after: accommodate existing summaries
ALTER TABLE ks.t WITH max_index_interval = 2048;
Defensive patterns

Strategy: fallback

Validate before calling

int eff = (int) Math.ceil((BASE_SAMPLING_LEVEL / (double) samplingLevel) * minIndexInterval); if (eff > maxIndexInterval) planSummaryRebuild();

Try / catch

try { summary.deserialize(in, partitioner, minInterval, maxInterval); } catch (IOException e) { rebuildIndexSummary(descriptor); }

Prevention

When it happens

Trigger: Loading a summary whose sampling level (from index sampling during compaction/downsampling) yields effectiveInterval = ceil(BASE_SAMPLING_LEVEL/samplingLevel * minIndexInterval) > max_index_interval, typically after lowering max_index_interval in the schema while old sstables exist.

Common situations: Schema change of max_index_interval without rebuilding summaries, restored sstables from a table with different index settings, version/upgrade mismatches.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/io/sstable/indexsummary/IndexSummary.java:443

        public <T extends InputStream & DataInputPlus> IndexSummary deserialize(T in, IPartitioner partitioner, int expectedMinIndexInterval, int maxIndexInterval) throws IOException
        {
            int minIndexInterval = in.readInt();
            if (minIndexInterval != expectedMinIndexInterval)
            {
                throw new IOException(String.format("Cannot read index summary because min_index_interval changed from %d to %d.",
                                                    minIndexInterval, expectedMinIndexInterval));
            }

            int offsetCount = in.readInt();
            long offheapSize = in.readLong();
            int samplingLevel = in.readInt();
            int fullSamplingSummarySize = in.readInt();

            int effectiveIndexInterval = (int) Math.ceil((BASE_SAMPLING_LEVEL / (double) samplingLevel) * minIndexInterval);
            if (effectiveIndexInterval > maxIndexInterval)
            {
                throw new IOException(String.format("Rebuilding index summary because the effective index interval (%d) is higher than" +
                                                    " the current max index interval (%d)", effectiveIndexInterval, maxIndexInterval));
            }

            Memory offsets = Memory.allocate(offsetCount * 4);
            Memory entries = Memory.allocate(offheapSize - offsets.size());
            try
            {
                FBUtilities.copy(in, new MemoryOutputStream(offsets), offsets.size());
                FBUtilities.copy(in, new MemoryOutputStream(entries), entries.size());
            }
            catch (IOException ioe)
            {
                offsets.free();
                entries.free();
                throw ioe;
            }

            // Before 5.0 offsets were written using Native Endian, now they are stored as Little Endian,

View on GitHub (pinned to 88fd0f6a0e)