apache/cassandra · warning
Failed to update per-column components for SSTable {}
Error message
Failed to update per-column components for SSTable {} What it means
During SAI index view updates, this warning is logged when updating per-column index components for an SSTable throws a Throwable. The SSTable's sstableContext is added to the invalid list so the index view treats its index files as unusable (they will be released/ignored) rather than failing the whole index or query. Callers (IndexViewManager.getBuiltinIndexes / indexes) will see this SSTable excluded from the set of valid indexed SSTables, which can degrade query completeness for data in that SSTable.
Source
Thrown at src/java/org/apache/cassandra/index/sai/view/IndexViewManager.java:206
logger.debug(index.identifier().logMessage("No on-disk index was built for SSTable {} because the SSTable " +
"had no indexable rows for the index."), sstableContext.descriptor());
}
else
{
logger.debug(index.identifier().logMessage("Successfully created index for SSTable {}."), sstableContext.descriptor());
}
// Try to add new index to the set, if set already has such index, we'll simply release and move on.
// This covers situation when SSTable collection has the same SSTable multiple
// times because we don't know what kind of collection it actually is.
if (!valid.add(ssTableIndex))
{
ssTableIndex.release();
}
}
catch (Throwable e)
{
logger.warn(index.identifier().logMessage("Failed to update per-column components for SSTable {}"), sstableContext.descriptor(), e);
invalid.add(sstableContext);
}
}
return Pair.create(valid, invalid);
}
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Run nodetool repair and/or scrubs, or DROP and re-CREATE the SAI index to rebuild the index components for the affected table
- Check the node's disk/filesystem health and replace failing hardware if IO errors appear in the logs
- Restore the SSTable set from a consistent snapshot (data files plus their index components) or remove the orphaned SSTable so it is compacted away
Example fix
// before: restoring only data files into the data dir cp data.tar/keyspace/table-*-Data.db /var/lib/cassandra/data/keyspace/table/ // after: restore the full SSTable set (data + index components) then rebuild the index cp -a data.tar/keyspace/table/* /var/lib/cassandra/data/keyspace/table/ && cqlsh -e "DROP INDEX ks.idx; CREATE INDEX ..."
Defensive patterns
Strategy: try-catch
Validate before calling
// before building the index view, check the SSTable's SAI components exist
for (String component : expectedPerColumnComponents)
{
if (!new File(sstableDir, baseName + component).exists())
logger.warn("Missing SAI component {} on {}", component, sstable); // SSTable will be treated invalid
} Try / catch
try { updatePerColumnComponents(sstableContext); }
catch (Throwable e)
{
logger.warn("SSTable {} has unusable index components - excluding from valid set", sstableContext.descriptor(), e);
invalid.add(sstableContext); // matches library behavior: degrade, don't crash
} Prevention
- Always restore SSTable sets (data + index components) together, never data files alone
- Rebuild SAI indexes after crashes that occurred mid-flush/compaction
- Run nodetool verify after restoring or moving SSTables between nodes
- Monitor logs for repeated invalid-SSTable warnings, which mean queries may silently miss data
When it happens
Trigger: Calling getBuiltIndexes (via IndexViewManager.indexes) during index initialization or SSTable addition when opening the SSTable's SAI index files fails - e.g. missing index component files, corrupted descriptors, or IO errors reading per-column components.
Common situations: An SSTable was moved/restored into the data directory without its SAI index components; partial writes from a crash left inconsistent index files; disk errors during component open; an upgrade changed the on-disk index format.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- The requested position exceeds the index length
- Key from data file (%s) does not match key from index file (
- {} failed for index component {} on SSTable {}
- Corrupt flags value for clustering prefix (isStatic flag set
- Corrupted sstable. Invalid flags found deserializing Deletio
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/08f0cf31dd771728.
Report an issue: GitHub.