apache/cassandra · warning

Interruption of compaction encountered exceptions:

Error message

Interruption of compaction encountered exceptions:

What it means

Warning logged by ExecutionFailure.handle when a compactor thread's task was interrupted (CompactionInterruptedException) but the task also carried suppressed exceptions — meaning additional errors occurred while stopping the compaction. The interruption itself is logged at INFO; the extra suppressed exceptions get a WARN with the stack trace.

Source

Thrown at src/java/org/apache/cassandra/concurrent/ExecutionFailure.java:62

    private static final Logger logger = LoggerFactory.getLogger(ExecutionFailure.class);

    /**
     * Invoke the relevant {@link java.lang.Thread.UncaughtExceptionHandler},
     * ignoring (except for logging) any {@link CompactionInterruptedException}
     */
    public static void handle(Throwable t)
    {
        try
        {
            if (t instanceof RequestTimeoutException || t instanceof CancellationException)
                return;

            if (t instanceof CompactionInterruptedException)
            {
                // TODO: should we check to see there aren't nested CompactionInterruptedException?
                logger.info(t.getMessage());
                if (t.getSuppressed() != null && t.getSuppressed().length > 0)
                    logger.warn("Interruption of compaction encountered exceptions:", t);
                else
                    logger.trace("Full interruption stack trace:", t);
            }
            else
            {
                Thread thread = Thread.currentThread();
                Thread.UncaughtExceptionHandler handler = thread.getUncaughtExceptionHandler();
                if (handler == null)
                    handler = JVMStabilityInspector::uncaughtException;
                handler.uncaughtException(thread, t);
            }
        }
        catch (Throwable shouldNeverHappen)
        {
            logger.error("Unexpected error while handling unexpected error", shouldNeverHappen);
        }
    }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Inspect the attached stack trace for the suppressed exceptions — the interruption itself is expected, the suppressed ones may indicate real I/O or SSTable problems.
  2. Verify SSTable integrity on the compacted table (nodetool verify / scrub) if suppressed exceptions mention read failures.
  3. If triggered intentionally by stop COMPACTION and suppressed errors are benign close-time noise, no action needed; compaction resumes later.
  4. If suppressed exceptions recur, check disk health and free space on the compaction destination.
Defensive patterns

Strategy: try-catch

Validate before calling

// before canceling, ensure no suppressed failures will hide real I/O errors
SSTableReader.validatePartitions / nodetool verify <keyspace> <table>

Try / catch

try {
    compact();
} catch (CompactionInterruptedException e) {
    for (Throwable s : e.getSuppressed()) logger.error("suppressed during compaction abort", s);
}

Prevention

When it happens

Trigger: Calling nodetool stop COMPACTION (or else a compaction strategy/repair path cancels compactions) while a compaction is mid-flight and the abort sequence also hits secondary failures (e.g. I/O errors while closing readers/writers, strategy-specific cleanup exceptions attached as suppressed throwables).

Common situations: Operators issuing `nodetool stop COMPACTION` during heavy compaction load; canceling validation/anticompaction; sstable-related I/O problems surfacing during the cancel path; seeing this while diagnosing an interrupted repair or shutdown.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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