{"record":{"id":"c81da6e8467baad8","repo":"apache/cassandra","slug":"could-not-cancel-in-progress-sequence-s","errorCode":null,"errorMessage":"Could not cancel in-progress sequence: %s","messagePattern":"Could not cancel in-progress sequence: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":897,"sourceCode":"            throw new RuntimeException(\"Could not perform startup sequence and join cluster\", e);\n        }\n\n        maybeInitializeServices();\n        completeInitialization();\n    }\n\n    private void completeInitialization()\n    {\n        initialized = true;\n    }\n\n    public static boolean cancelInProgressSequences(NodeId sequenceOwner)\n    {\n        return ClusterMetadataService.instance()\n                                     .commit(new CancelInProgressSequence(sequenceOwner),\n                                             metadata -> true,\n                                             (code, message) -> {\n                                                 logger.warn(String.format(\"Could not cancel in-progress sequence: %s\", message));\n                                                 return false;\n                                             });\n    }\n\n    private boolean servicesInitialized = false;\n    public void maybeInitializeServices()\n    {\n        if (servicesInitialized)\n            return;\n\n        StorageProxy.instance.initialLoadPartitionDenylist();\n        LoadBroadcaster.instance.startBroadcasting();\n        DiskUsageBroadcaster.instance.startBroadcasting();\n        HintsService.instance.startDispatch();\n        BatchlogManager.instance.start();\n        servicesInitialized = true;\n    }\n","sourceCodeStart":879,"sourceCodeEnd":915,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L879-L915","documentation":"WARN inside StorageService.cancelInProgressSequences(): the CancelInProgressSequence cluster-metadata commit failed, and the supplied failure callback logs that the in-progress sequence (owned by sequenceOwner NodeId) could not be cancelled, then returns false. This is part of the Accord/ClusterMetadataService transaction path — a rejected or failed metadata commit means the sequence may still be running.","triggerScenarios":"cancelInProgressSequences(nodeId) invoked (e.g. during node removal/replacement) and ClusterMetadataService.commit calls back with (code, message) indicating the commit was rejected or failed.","commonSituations":"Accord coordination sequences still active for the target node during decommission/replace; CMS not yet ready or a concurrent metadata change conflicting; retrying cancel for a node with no active sequence.","solutions":["Read the logged message for the commit failure code and address the underlying CMS condition.","Retry cancelInProgressSequences once cluster metadata is stable (quorum of CMS replicas healthy).","Check 'nodetool cms' / cluster metadata health; ensure the node is not mid-reconfiguration.","If the sequence owner is being removed, complete the removal procedure (assassinate/replace per runbook) which supersedes the sequence."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// ensure CMS is available before attempting cancel\nboolean cmsReady = ClusterMetadataService.instance().isSetup();","typeGuard":null,"tryCatchPattern":"boolean cancelled = cancelInProgressSequences(nodeId);\nif (!cancelled) { /* sequence still active: inspect logged failure message and retry after cluster metadata stabilizes */ }","preventionTips":["Verify CMS quorum health before metadata commits.","Avoid concurrent node operations (decommission/replace overlapping).","Confirm the node actually owns an active sequence before cancelling."],"tags":["cassandra","accord","cluster-metadata","transaction"],"backgroundTag":"conflicting-config-options","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"}