{"record":{"id":"3a74e2b0c312fa91","repo":"apache/cassandra","slug":"cannot-deserialize-index-summary-from-s","errorCode":null,"errorMessage":"Cannot deserialize index summary from %s","messagePattern":"Cannot deserialize index summary from (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/io/sstable/format/big/IndexSummaryComponent.java","lineNumber":98,"sourceCode":"\n        IndexSummary summary = null;\n        try (FileInputStreamPlus iStream = summaryFile.newInputStream())\n        {\n            summary = IndexSummary.serializer.deserialize(iStream,\n                                                          metadata.partitioner,\n                                                          metadata.params.minIndexInterval,\n                                                          metadata.params.maxIndexInterval);\n            DecoratedKey first = metadata.partitioner.decorateKey(ByteBufferUtil.readWithLength(iStream));\n            DecoratedKey last = metadata.partitioner.decorateKey(ByteBufferUtil.readWithLength(iStream));\n\n            return new IndexSummaryComponent(summary, first, last);\n        }\n        catch (IOException ex)\n        {\n            if (summary != null)\n                summary.close();\n\n            throw new IOException(String.format(\"Cannot deserialize index summary from %s\", summaryFile), ex);\n        }\n    }\n\n    public static IndexSummaryComponent loadOrDeleteCorrupted(File summaryFile, TableMetadata metadata) throws IOException\n    {\n        try\n        {\n            return load(summaryFile, metadata);\n        }\n        catch (IOException ex)\n        {\n            summaryFile.deleteIfExists();\n            throw ex;\n        }\n    }\n\n    /**\n     * Save index summary to Summary.db file.","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/io/sstable/format/big/IndexSummaryComponent.java#L80-L116","documentation":"Thrown when the index summary (Summary.db) exists but cannot be deserialized — an IOException occurred while reading its header or contents. The wrapping preserves the underlying cause; the summary component is corrupt.","triggerScenarios":"Loading an SSTable whose Summary.db has invalid magic/version/header or truncated content, via IndexSummaryComponent.load (e.g. during verify or loadOrDeleteCorrupted paths).","commonSituations":"Bit rot or partial write of Summary.db; version mismatch (SSTable from a different Cassandra version); manual edits; crash during summary save.","solutions":["Regenerate the summary via `nodetool scrub` / sstablescrub or delete the SSTable and repair from replicas","Check the underlying cause in the exception chain (truncation vs format mismatch) and the SSTable format version compatibility","Restore Summary.db from backup"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { component = IndexSummaryComponent.load(file, metadata); }\ncatch (IOException e) {\n    logger.warn(\"Corrupt summary for {}: {}\", file, e.getCause());\n    rebuildOrRepair(descriptor);\n}","preventionTips":["Keep SSTable format versions consistent across upgrades (finish upgrades before restores)","Check for disk bit rot","Restore only complete, verified file sets"],"tags":["sstable","summary","deserialization","corruption"],"backgroundTag":"json-unmarshal-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}