{"record":{"id":"ee430fe67c8a0824","repo":"apache/cassandra","slug":"interruption-of-compaction-encountered-exceptions","errorCode":null,"errorMessage":"Interruption of compaction encountered exceptions:","messagePattern":"Interruption of compaction encountered exceptions:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/concurrent/ExecutionFailure.java","lineNumber":62,"sourceCode":"    private static final Logger logger = LoggerFactory.getLogger(ExecutionFailure.class);\n\n    /**\n     * Invoke the relevant {@link java.lang.Thread.UncaughtExceptionHandler},\n     * ignoring (except for logging) any {@link CompactionInterruptedException}\n     */\n    public static void handle(Throwable t)\n    {\n        try\n        {\n            if (t instanceof RequestTimeoutException || t instanceof CancellationException)\n                return;\n\n            if (t instanceof CompactionInterruptedException)\n            {\n                // TODO: should we check to see there aren't nested CompactionInterruptedException?\n                logger.info(t.getMessage());\n                if (t.getSuppressed() != null && t.getSuppressed().length > 0)\n                    logger.warn(\"Interruption of compaction encountered exceptions:\", t);\n                else\n                    logger.trace(\"Full interruption stack trace:\", t);\n            }\n            else\n            {\n                Thread thread = Thread.currentThread();\n                Thread.UncaughtExceptionHandler handler = thread.getUncaughtExceptionHandler();\n                if (handler == null)\n                    handler = JVMStabilityInspector::uncaughtException;\n                handler.uncaughtException(thread, t);\n            }\n        }\n        catch (Throwable shouldNeverHappen)\n        {\n            logger.error(\"Unexpected error while handling unexpected error\", shouldNeverHappen);\n        }\n    }\n","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/concurrent/ExecutionFailure.java#L44-L80","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["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.","Verify SSTable integrity on the compacted table (nodetool verify / scrub) if suppressed exceptions mention read failures.","If triggered intentionally by stop COMPACTION and suppressed errors are benign close-time noise, no action needed; compaction resumes later.","If suppressed exceptions recur, check disk health and free space on the compaction destination."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before canceling, ensure no suppressed failures will hide real I/O errors\nSSTableReader.validatePartitions / nodetool verify <keyspace> <table>","typeGuard":null,"tryCatchPattern":"try {\n    compact();\n} catch (CompactionInterruptedException e) {\n    for (Throwable s : e.getSuppressed()) logger.error(\"suppressed during compaction abort\", s);\n}","preventionTips":["After stop COMPACTION, inspect the WARN stack trace for suppressed I/O errors, not just the INFO interruption message.","Run nodetool verify/scrub on tables whose compactions were interrupted if errors were reported.","Schedule cancellations outside peak compaction windows.","Keep disks healthy and below capacity to reduce close-time I/O failures."],"tags":["compaction","interruption","logging","storage"],"backgroundTag":"invalid-state-transition","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"}