{"record":{"id":"059fa3a654284e5a","repo":"apache/cassandra","slug":"no-s-operation-in-progress-for-s-can-t-abort","errorCode":null,"errorMessage":"No %s operation in progress for %s, can't abort (%s)","messagePattern":"No (.+?) operation in progress for (.+?), can't abort \\((.+?)\\)","errorType":"exception","errorClass":"java.lang.IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tcm/sequences/SingleNodeSequences.java","lineNumber":272,"sourceCode":"            throw new IllegalStateException(String.format(\"This cluster is migrating to cluster metadata, can't abort %s until that is done.\", kind));\n\n        ClusterMetadata metadata = ClusterMetadata.current();\n        NodeId toAbort = nodeId == null ? metadata.myNodeId() : NodeId.fromString(nodeId);\n        MultiStepOperation<?> sequence = metadata.inProgressSequences.get(toAbort);\n        if (sequence == null || sequence.kind() != kind)\n        {\n            if (toAbort.equals(metadata.myNodeId()) && ssMode != null && StorageService.instance.operationMode() == ssMode)\n            {\n                // there is no ongoing sequence with the given kind, but storage service operation mode is set, clear it\n                logger.debug(\"There is no ongoing {} sequence for this node, but operation mode is {} - clearing transient mode\", kind, ssMode);\n                StorageService.instance.clearTransientMode();\n                return;\n            }\n            else\n            {\n                String msg = String.format(\"No %s operation in progress for %s, can't abort (%s)\", kind, toAbort, sequence);\n                logger.info(msg);\n                throw new IllegalStateException(msg);\n            }\n        }\n        if (toAbort.equals(metadata.myNodeId()))\n        {\n            if (ssMode != null && StorageService.instance.operationMode() != ssMode)\n            {\n                String msg = String.format(\"Can't abort a %s operation unless it has failed\", kind);\n                logger.info(msg);\n                throw new IllegalStateException(msg);\n            }\n            StorageService.instance.clearTransientMode();\n        }\n        else if (Gossiper.instance.isAlive(metadata.directory.endpoint(toAbort)))\n        {\n            String msg = String.format(\"Can't abort a %s operation for a node %s (%s) that is UP - run abortdecommission on that instance\",\n                                       kind, toAbort, metadata.directory.endpoint(toAbort));\n            logger.info(msg);\n            throw new IllegalStateException(msg);","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/sequences/SingleNodeSequences.java#L254-L290","documentation":"SingleNodeSequences.abortHelper validates that a decommission/remove/move operation is actually in progress for the requested node before committing a CancelInProgressSequence. If ClusterMetadata contains no matching in-progress sequence, it logs and throws IllegalStateException because there is nothing to abort. This is a state precondition check, not a data corruption issue.","triggerScenarios":"Calling nodetool abortdecommission / abortremove / abortmove (abortDecommission, abortRemoveNode, abortMove) when no corresponding sequence is registered in ClusterMetadata for the target node, or after the operation already completed/was cancelled.","commonSituations":"Operator retries an abort command twice; abort issued for the wrong node id; the original operation finished between failure and abort attempt; node id typo.","solutions":["Verify the in-progress sequence with nodetool / cluster metadata before aborting (check the target node id)","Confirm the operation actually failed - a completed decommission cannot be aborted","Retry with the correct NodeId; use the id from the failed node's logs"],"exampleFix":"// before\nnodetool abortdecommission 9d7e... (no operation in progress)\n// after\n// first confirm the in-progress sequence:\nnodetool clustermetadata inprogresssequence   // or inspect ClusterMetadata.current().inProgressSequences\nnodetool abortdecommission <correctNodeId>","handlingStrategy":"validation","validationCode":"// before aborting, confirm an in-progress sequence exists for the node\nClusterMetadata cm = ClusterMetadata.current();\nif (!cm.inProgressSequences().anyMatch(s -> s.nodeId().equals(targetNodeId)))\n    throw new IllegalStateException(\"No operation in progress for \" + targetNodeId);","typeGuard":null,"tryCatchPattern":"try { nodetoolAbortDecommission(nodeId); }\ncatch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"No \")) { /* nothing to abort - operation already finished */ }\n    else throw e;\n}","preventionTips":["Check the in-progress sequence list before issuing any abort command","Use the exact NodeId from cluster metadata, not a hostname or guess","Remember abort is idempotent-hostile: a second call always throws"],"tags":["cluster-operations","state-validation","tcm"],"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"}