apache/cassandra · critical · CorruptSSTableException
CorruptSSTableException / NoSuchFileException: missing compr
Error message
CorruptSSTableException / NoSuchFileException: missing compression info component file ${compressionInfoFile.absolutePath()} What it means
verifyCompressionInfoExistenceIfApplicable validates that an SSTable whose TOC lists a CompressionInfo component actually has the CompressionInfo.db file on disk. When the TOC expects it but the file is absent, it throws CorruptSSTableException wrapping NoSuchFileException naming the missing file path. This catches SSTables whose component set is incomplete.
Source
Thrown at src/java/org/apache/cassandra/io/sstable/format/CompressionInfoComponent.java:85
* The verification depends on the existence of TOC file. If absent, the verification is skipped.
*
* @param descriptor
* @param actualComponents actual components listed from the file system.
* @throws CorruptSSTableException if TOC expects compression info but not found from disk.
* @throws FSReadError if unable to read from TOC file.
*/
public static void verifyCompressionInfoExistenceIfApplicable(Descriptor descriptor, Set<Component> actualComponents) throws CorruptSSTableException, FSReadError
{
File tocFile = descriptor.fileFor(Components.TOC);
if (tocFile.exists())
{
try
{
Set<Component> expectedComponents = TOCComponent.loadTOC(descriptor, false);
if (expectedComponents.contains(Components.COMPRESSION_INFO) && !actualComponents.contains(Components.COMPRESSION_INFO))
{
File compressionInfoFile = descriptor.fileFor(Components.COMPRESSION_INFO);
throw new CorruptSSTableException(new NoSuchFileException(compressionInfoFile.absolutePath()), compressionInfoFile);
}
}
catch (IOException e)
{
throw new FSReadError(e, tocFile);
}
}
}
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Restore the missing CompressionInfo.db from a snapshot/backup of the same SSTable, or copy the complete SSTable (all TOC components) again
- If the data is recoverable from other replicas, move/delete the incomplete SSTable and run nodetool repair to restore the range
- Use the TOC (Index.db/_toc file) to enumerate required components and verify the whole set exists before re-adding the SSTable
- Rebuild the SSTable from source (re-stream/rewriter) if no backup exists
Defensive patterns
Strategy: validation
Validate before calling
// Verify all TOC-listed components exist before adding an SSTable
Set<Component> toc = TOCComponent.loadTOC(descriptor, false);
for (Component c : toc)
if (!descriptor.fileFor(c).exists())
throw new IllegalStateException("Missing component " + c + " for " + descriptor); Try / catch
try { sstable = openSSTable(descriptor); }
catch (CorruptSSTableException e) {
logger.error("Incomplete SSTable {}: {}", descriptor, e.getMessage());
// restore from snapshot or remove and repair
} Prevention
- Never copy SSTables file-by-file; use nodetool snapshot and copy the whole snapshot dir
- Include _toc and all TOC-listed components in any backup
- Check TOC completeness before moving SSTables between nodes
- Avoid cleanup scripts that delete 'unknown' files in data dirs
When it happens
Trigger: Opening/loading a compressed SSTable where the CompressionInfo component is listed in the TOC but CompressionInfo.db does not exist in the SSTable directory (file deleted, incomplete copy/restore, snapshot moved without all components).
Common situations: Manual SSTable restores that copied only some components; backups taken mid-write; cleanup scripts deleting 'extra' files; moved SSTables between nodes without the TOC-listed components.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Invalid negative chunk index %d with position %d
- Corrupt flags value for clustering prefix (isStatic flag set
- Corrupted sstable. Invalid flags found deserializing Deletio
- Failed verifying SSTable <descriptor>
- Failed to import sstable <filename>
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/3d00f4a6870bd132.
Report an issue: GitHub.