apache/cassandra · warning · InterruptedException
SSTables import has been aborted
Error message
SSTables import has been aborted
What it means
abortIfDraining checks StorageService.instance.isDraining() before each phase of an SSTable import and throws InterruptedException 'SSTables import has been aborted' to stop the import if the node has started draining (e.g., shutdown, decommission, nodetool drain). It is a deliberate cooperative-abort mechanism, not a fault.
Source
Thrown at src/java/org/apache/cassandra/db/SSTableImporter.java:256
catch (Throwable t)
{
logger.error("[{}] Failed adding SSTables", importID, t);
throw new RuntimeException("Failed adding SSTables", t);
}
logger.info("[{}] Done loading load new SSTables for {}/{}", importID, cfs.getKeyspaceName(), cfs.getTableName());
return failedDirectories;
}
/**
* Check the state of this node and throws an {@link InterruptedException} if it is currently draining
*
* @throws InterruptedException if the node is draining
*/
private static void abortIfDraining() throws InterruptedException
{
if (StorageService.instance.isDraining())
throw new InterruptedException("SSTables import has been aborted");
}
private void logLeveling(UUID importID, Set<SSTableReader> newSSTables)
{
StringBuilder sb = new StringBuilder();
for (SSTableReader sstable : cfs.getSSTables(SSTableSet.CANONICAL))
sb.append(formatMetadata(sstable));
logger.debug("[{}] Current sstables: {}", importID, sb);
sb = new StringBuilder();
for (SSTableReader sstable : newSSTables)
sb.append(formatMetadata(sstable));
logger.debug("[{}] New sstables: {}", importID, sb);
}
private static String formatMetadata(SSTableReader sstable)
{
return String.format("{[%s, %s], %d, %s, %d}",
sstable.getFirst().getToken(),View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Nothing is broken: rerun the import after the node restarts and is fully up (UT are safe; already-imported SSTables are ignored on retry)
- Schedule imports outside maintenance windows and check `nodetool status`/drain state before starting
- Ensure decommission/drain automation does not overlap with data-staging jobs that run nodetool import
Example fix
// before: import racing with drain nodetool import -- ks table /data/import &; nodetool drain // after: drain first, then import after restart nodetool drain && (restart) && nodetool status && nodetool import -- ks table /data/import
Defensive patterns
Strategy: try-catch
Validate before calling
// check node state before starting an import
if (storageService.isDraining() || storageService.isStartingMode()) {
throw new IllegalStateException("cannot import while node is draining/bootstrapping");
} Try / catch
try (InterruptedException ignored = runImport()) {
// 'SSTables import has been aborted' is expected if the node drained mid-import
} catch (InterruptedException e) {
logger.info("Import aborted by drain/shutdown; will re-run after restart");
} Prevention
- Check node status (nodetool status / drain state) before launching imports
- Coordinate import jobs with maintenance and drain/decommission automation
- Make imports idempotent so reruns after an abort are safe (they are by design)
- Avoid starting imports near scheduled restarts or k8s preStop windows
When it happens
Trigger: A long-running `nodetool import` is in progress and the node begins draining (nodetool drain/decommission/stop); the next abortIfDraining() call inside importNewSSTables throws InterruptedException.
Common situations: Automated shutdown/decommission scripts racing with a manual SSTable import; operators starting an import right before a rolling restart; kubernetes/prestop hooks draining the node.
Related errors
- Missing SAI index to import for SSTable %s on %s.%s
- Missing SAI index to import for index %s on %s.%s
- Failed verifying SSTable <descriptor>
- Failed importing SSTables
- Failed adding SSTables
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/da68393c59f1026e.
Report an issue: GitHub.