{"record":{"id":"0d691f785ea3e39c","repo":"apache/cassandra","slug":"aborted-garbage-collection-for-at-least-one-table-0d691f","errorCode":null,"errorMessage":"Aborted garbage collection for at least one table, check server logs for more information.","messagePattern":"Aborted garbage collection for at least one table, check server logs for more information\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":512,"sourceCode":"                throw new RuntimeException(String.format(\"Failed marking some sstables compacting in keyspace %s, check server logs for more information.\\n\", ks));\n        }\n    }\n\n    public void garbageCollect(PrintStream out, String tombstoneOption, int jobs, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException\n    {\n        if (garbageCollect(tombstoneOption, jobs, keyspaceName, tableNames) != 0)\n        {\n            out.println(\"Aborted garbage collection for at least one table in keyspace \" + keyspaceName + \", check server logs for more information.\");\n            throw new RuntimeException(\"Aborted garbage collection for at least one table in keyspace \" + keyspaceName + \", check server logs for more information.\");\n        }\n    }\n\n    public void userDefinedGarbageCollect(PrintStream out, String tombstoneOption, int jobs, List<String> userDefinedTables) throws IOException, ExecutionException, InterruptedException\n    {\n        if (userDefinedGarbageCollect(tombstoneOption, jobs, userDefinedTables) != 0)\n        {\n            out.println(\"Aborted garbage collection for at least one table, check server logs for more information.\");\n            throw new RuntimeException(\"Aborted garbage collection for at least one table, check server logs for more information.\");\n        }\n    }\n\n    public void forceUserDefinedCompaction(String datafiles) throws IOException, ExecutionException, InterruptedException\n    {\n        compactionProxy.forceUserDefinedCompaction(datafiles);\n    }\n\n    public void forceKeyspaceCompaction(boolean splitOutput, int parallelism, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException\n    {\n        ssProxy.forceKeyspaceCompaction(splitOutput, parallelism, keyspaceName, tableNames);\n    }\n\n    public void forceKeyspaceCompaction(boolean splitOutput, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException\n    {\n        ssProxy.forceKeyspaceCompaction(splitOutput, keyspaceName, tableNames);\n    }\n","sourceCodeStart":494,"sourceCodeEnd":530,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L494-L530","documentation":"The public userDefinedGarbageCollect wrapper invokes garbage collection on user-defined (already listed) SSTables via JMX and throws RuntimeException with this message when the operation reports a non-zero (aborted/failed) status for any table.","triggerScenarios":"nodetool garbagecollect on user-defined files (NodeProbe.userDefinedGarbageCollect) when the server-side operation returns a non-zero status — the GC compaction was aborted or failed for at least one of the supplied user-defined SSTables.","commonSituations":"User-defined compaction list referencing SSTables that were compacted away or deleted between listing and execution; concurrent operations holding those SSTables; typo'd or stale datafile paths.","solutions":["Check server logs for why the user-defined compaction aborted","Regenerate the SSTable list — files may have changed since it was produced","Re-run the command when no other compaction jobs target the same files"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Validate datafile list is fresh before invoking\nif (datafiles == null || datafiles.isEmpty()) return;","typeGuard":null,"tryCatchPattern":"try {\n    probe.userDefinedGarbageCollect(out, tombstoneOption, jobs, userDefinedTables);\n} catch (RuntimeException e) {\n    logger.warn(\"user-defined garbagecollect aborted; regenerating SSTable list and retrying\", e);\n    retryWithFreshList();\n}","preventionTips":["Regenerate user-defined SSTable lists immediately before use","Don't run user-defined compaction while other compactions target the same files","Verify listed SSTables still exist on the node"],"tags":["compaction","garbagecollect","user-defined","jmx"],"backgroundTag":"database-query-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}