{"record":{"id":"9be9b9d577e6dddd","repo":"conductor-oss/conductor","slug":"failed-to-remove-workflow-s","errorCode":null,"errorMessage":"Failed to remove workflow: %s","messagePattern":"Failed to remove workflow: (.+?)","errorType":"exception","errorClass":"TransientException","httpStatus":500,"severity":"error","filePath":"cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java","lineNumber":477,"sourceCode":"\n    @Override\n    public boolean removeWorkflow(String workflowId) {\n        WorkflowModel workflow = getWorkflow(workflowId, true);\n        boolean removed = false;\n        // TODO: calculate number of shards and iterate\n        if (workflow != null) {\n            try {\n                recordCassandraDaoRequests(\"removeWorkflow\", \"n/a\", workflow.getWorkflowName());\n                ResultSet resultSet =\n                        session.execute(\n                                deleteWorkflowStatement.bind(\n                                        UUID.fromString(workflowId), DEFAULT_SHARD_ID));\n                removed = resultSet.wasApplied();\n            } catch (DriverException e) {\n                Monitors.error(CLASS_NAME, \"removeWorkflow\");\n                String errorMsg = String.format(\"Failed to remove workflow: %s\", workflowId);\n                LOGGER.error(errorMsg, e);\n                throw new TransientException(errorMsg);\n            }\n            workflow.getTasks().forEach(this::removeTaskLookup);\n        }\n        return removed;\n    }\n\n    /**\n     * This is a dummy implementation and this feature is not yet implemented for Cassandra backed\n     * Conductor\n     */\n    @Override\n    public boolean removeWorkflowWithExpiry(String workflowId, int ttlSeconds) {\n        throw new UnsupportedOperationException(\n                \"This method is not currently implemented in CassandraExecutionDAO. Please use RedisDAO mode instead now for using TTLs.\");\n    }\n\n    /**\n     * No-op: Cassandra does not maintain a pending-workflows structure, so there is nothing to","sourceCodeStart":459,"sourceCodeEnd":495,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java#L459-L495","documentation":"Thrown by CassandraExecutionDAO.removeWorkflow when deleting a workflow row fails. DriverException during the delete (plus UUID.fromString on workflowId) is wrapped in TransientException (cause not attached). Reports the workflowId. Note the delete is followed by removeTaskLookup for each task, so a failure leaves the workflow row but the subsequent cleanup is skipped.","triggerScenarios":"Calling removeWorkflow(String workflowId) when Cassandra is unavailable, the workflowId is not a valid UUID, or the delete times out / fails consistency.","commonSituations":"Cassandra connectivity loss. Non-UUID workflow ID. Delete timeout. Schema drift. Partial cleanup if the row delete succeeds but task lookups fail (and vice versa).","solutions":["Ensure the workflowId is a valid UUID.","Confirm Cassandra health and retry the remove.","After a successful retry, verify task_lookup rows for the workflow's tasks are gone (cleanup runs after the delete).","Preserve the cause when rethrowing for better diagnostics."],"exampleFix":"// before\nthrow new TransientException(errorMsg);\n\n// after\nthrow new TransientException(errorMsg, e);","handlingStrategy":"validation","validationCode":"// Ensure workflow id is a UUID before removeWorkflow\nif (!isUuid(workflowId))\n    throw new IllegalArgumentException(\"non-UUID workflow id: \" + workflowId);","typeGuard":"static boolean isUuid(String s) {\n    try { java.util.UUID.fromString(s); return true; } catch (IllegalArgumentException e) { return false; }\n}","tryCatchPattern":"try {\n    return dao.removeWorkflow(workflowId);\n} catch (TransientException e) {\n    log.warn(\"Transient removeWorkflow failure for {}; retrying\", workflowId);\n    throw e;","preventionTips":["Validate the workflowId is a UUID before remove.","After a successful retry, verify task_lookup rows were cleaned up.","Attach the cause (currently dropped) when rethrowing for diagnosis."],"tags":["cassandra","workflow","delete","transient","persistence"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}