{"record":{"id":"9ff3f6fb5bd5eec0","repo":"apache/cassandra","slug":"cannot-assassinate-the-node-when-sequence-of-kind-9ff3f6","errorCode":null,"errorMessage":"Cannot assassinate the node when sequence of kind ${sequenceKind} is in progress.","messagePattern":"Cannot assassinate the node when sequence of kind (.+?) is in progress\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/CMSOfflineTool.java","lineNumber":370,"sourceCode":"            NodeId nodeId = nodeIdentifierOption.getNodeId(metadata);\n\n            // Check if there are any in-progress sequences for given node\n            // If any, then cancel the sequence and then assassinate it\n            if (metadata.inProgressSequences.contains(nodeId))\n            {\n                MultiStepOperation<?> multiStepOperation = metadata.inProgressSequences.get(nodeId);\n                MultiStepOperation.Kind sequenceKind = multiStepOperation.kind();\n                if (!supportedCancelSequences.contains(sequenceKind))\n                {\n                    if (sequenceKind == MultiStepOperation.Kind.JOIN || sequenceKind == MultiStepOperation.Kind.REPLACE)\n                    {\n                        throw new IllegalArgumentException(\"Cannot assassinate the node when sequence of kind \" +\n                                                           sequenceKind + \" is in progress. \" +\n                                                           \"Run abortbootstrap instead.\");\n                    }\n                    else\n                    {\n                        throw new IllegalArgumentException(\"Cannot assassinate the node when sequence of kind \" +\n                                                           sequenceKind + \" is in progress.\");\n                    }\n                }\n\n                output.out.printf(\"Cancelling in-progress sequence of kind %s before assassinating node.\\n\",\n                                  metadata.inProgressSequences.get(nodeId).kind());\n                metadata = new CancelInProgressSequence(nodeId).execute(metadata).success().metadata;\n            }\n\n            metadata = maybeReconfigureCMS(metadata, nodeId);\n            Assassinate transformation = new Assassinate(nodeId, ClusterMetadataService.instance().placementProvider());\n            ClusterMetadata updatedMetadata = transformation.execute(metadata).success().metadata;\n\n            writeMetadata(output, updatedMetadata, outputFilePath);\n        }\n\n        ClusterMetadata maybeReconfigureCMS(ClusterMetadata metadata, NodeId nodeId)\n        {","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/CMSOfflineTool.java#L352-L388","documentation":"Generic guard for the assassinate path: when the node has any in-progress sequence kind that the tool cannot cancel and which is not JOIN/REPLACE, it throws this IllegalArgumentException because assassinating a node with that sequence active is unsafe/unsupported.","triggerScenarios":"Assassinate operation in `execute` when metadata.inProgressSequences contains a kind not in supportedCancelSequences and not JOIN/REPLACE (e.g. MOVE, REBUILD, or another MultiStepOperation.Kind).","commonSituations":"Operator force-removes a node that had an in-progress MOVE or other range-movement sequence; leftover sequence state in the offline metadata snapshot from an interrupted operation.","solutions":["Cancel or complete the in-progress sequence via the appropriate CMSOfflineTool subcommand (e.g. finish/cancel move) before assassinating.","Restart the node and let the sequence resolve, then remove it through decommission.","Manually clear the sequence from cluster metadata only as a last-resort recovery with community guidance."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"MultiStepOperation<?> op = meta.inProgressSequences.get(nodeId);\nif (op != null && !supportedCancelSequences.contains(op.kind()))\n    throw new IllegalStateException(\"Cancel or complete sequence \" + op.kind() + \" before assassinating \" + nodeId);","typeGuard":null,"tryCatchPattern":"try { tool.assassinate(nodeId); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"Cannot assassinate\")) { cancelSequenceFirst(nodeId); } else throw e; }","preventionTips":["Always resolve in-progress sequences (move, rebuild, etc.) before force-removal.","Audit leftover sequences after any interrupted operation.","Use decommission when the node is reachable; reserve assassinate as last resort."],"tags":["assassinate","sequence-in-progress","cms","unsupported-operation"],"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-17T15:17:12.973Z"}