apache/cassandra · error · IOException

Failed to save index summary to

Error message

Failed to save index summary to 

What it means

Thrown when writing an index summary to Summary.db fails with an IOException; if deleteOnFailure was set the partial file is removed first. This indicates the SSTable could not persist its summary, preventing it from being opened.

Solutions

  1. Free disk space on the data directory and retry the operation/restart
  2. Fix directory permissions/ownership so Cassandra can write Summary.db
  3. Check filesystem health; remove leftover partial Summary.db files (already deleted when deleteOnFailure) and reopen
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight checks before opening SSTables
assert dataDir.canWrite() : "data dir not writable";
assert dataDir.getUsableSpace() > minRequiredBytes : "insufficient disk space";

Try / catch

try { sstable = openComponents(...); }
catch (IOException e) {
    logger.error("Failed saving index summary to {}: {}", e.getMessage(), e.getCause());
    alertDiskOrPermissions();
}

Prevention

When it happens

Trigger: Opening an SSTable that requires building/saving its index summary (e.g. summary rebuild on open via openComponents) and the write fails — disk full, permission denied, or I/O error on the SSTable directory.

Common situations: Disk full on the data volume; read-only or wrong-ownership data directory; filesystem errors; interrupted save.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/io/sstable/format/big/IndexSummaryComponent.java:133

    /**
     * Save index summary to Summary.db file.
     */
    public void save(File summaryFile, boolean deleteOnFailure) throws IOException
    {
        if (summaryFile.exists())
            summaryFile.delete();

        try (DataOutputStreamPlus oStream = summaryFile.newOutputStream(File.WriteMode.OVERWRITE))
        {
            IndexSummary.serializer.serialize(indexSummary, oStream);
            ByteBufferUtil.writeWithLength(first.getKey(), oStream);
            ByteBufferUtil.writeWithLength(last.getKey(), oStream);
        }
        catch (IOException ex)
        {
            if (deleteOnFailure)
                summaryFile.deleteIfExists();
            throw new IOException("Failed to save index summary to " + summaryFile, ex);
        }
    }
}

View on GitHub (pinned to 88fd0f6a0e)