{"record":{"id":"dc129fac7a4c4cee","repo":"conductor-oss/conductor","slug":"failed-to-remove-task-definition-s","errorCode":null,"errorMessage":"Failed to remove task definition: %s","messagePattern":"Failed to remove task definition: (.+?)","errorType":"exception","errorClass":"TransientException","httpStatus":500,"severity":"error","filePath":"cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraMetadataDAO.java","lineNumber":159,"sourceCode":"    public TaskDef getTaskDef(String name) {\n        return getTaskDefFromDB(name);\n    }\n\n    @Override\n    public List<TaskDef> getAllTaskDefs() {\n        return getAllTaskDefsFromDB();\n    }\n\n    @Override\n    public void removeTaskDef(String name) {\n        try {\n            recordCassandraDaoRequests(\"removeTaskDef\");\n            session.execute(deleteTaskDefStatement.bind(name));\n        } catch (DriverException e) {\n            Monitors.error(CLASS_NAME, \"removeTaskDef\");\n            String errorMsg = String.format(\"Failed to remove task definition: %s\", name);\n            LOGGER.error(errorMsg, e);\n            throw new TransientException(errorMsg, e);\n        }\n    }\n\n    @Override\n    public void createWorkflowDef(WorkflowDef workflowDef) {\n        try {\n            String workflowDefinition = toJson(workflowDef);\n            if (!session.execute(\n                            insertWorkflowDefStatement.bind(\n                                    workflowDef.getName(),\n                                    workflowDef.getVersion(),\n                                    workflowDefinition))\n                    .wasApplied()) {\n                throw new ConflictException(\n                        \"Workflow: %s, version: %s already exists!\",\n                        workflowDef.getName(), workflowDef.getVersion());\n            }\n            String workflowDefIndex =","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraMetadataDAO.java#L141-L177","documentation":"CassandraMetadataDAO.removeTaskDef wraps DriverException in a TransientException naming the task definition. Deleting a task def fails at the driver level; this is treated as retriable and the framework RetryTemplate retries it. Note the index row deletion happens separately, so a mid-way failure can leave the def/index momentarily inconsistent until retry succeeds.","triggerScenarios":"Calling removeTaskDef(name) and the underlying delete against the task_def table fails: write/delete timeout, node unavailable, consistency not met.","commonSituations":"Cluster instability during metadata changes, driver pool exhaustion, consistency unreachable during node loss.","solutions":["Verify Cassandra is healthy and the delete consistency is satisfiable.","Tune DataStax driver pool/timeout settings via cassandra.properties.","Depend on the framework retry; if it fails through, check the logged DriverException cause.","After a successful retry, confirm the task def and its index row are both gone."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"RetryTemplate retry = RetryTemplate.builder().retryOn(TransientException.class).maxAttempts(3).noBackoff().build();\nretry.execute(ctx -> { metadataDAO.removeTaskDef(name); return null; });","preventionTips":["Tune driver delete timeouts for metadata operations.","Keep the task_def table RF consistent with write consistency.","After retries succeed, verify both the def row and its index row are removed."],"tags":["cassandra","persistence","transient","driver","metadata","task-def","retry","dao"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}