{"record":{"id":"2b640f486e08745a","repo":"conductor-oss/conductor","slug":"error-removing-workflow","errorCode":null,"errorMessage":"Error removing workflow: {}","messagePattern":"Error removing workflow: (.+?)","errorType":"exception","errorClass":"TransientException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java","lineNumber":467,"sourceCode":"            String workflowId, boolean archiveWorkflow, int ttlSeconds) {\n        try {\n            WorkflowModel workflow = getWorkflowModelFromDataStore(workflowId, true);\n\n            try {\n                removeWorkflowIndex(workflow, archiveWorkflow);\n            } catch (NotFoundException e) {\n                if (archiveWorkflow) {\n                    throw e;\n                }\n                // Idempotent deletion: missing index records should not block DAO removal.\n                LOGGER.info(\n                        \"Workflow {} not found in index during removal, continuing\", workflowId, e);\n            }\n            // remove workflow from DAO with TTL\n            executionDAO.removeWorkflowWithExpiry(workflowId, ttlSeconds);\n        } catch (Exception e) {\n            Monitors.recordDaoError(\"executionDao\", \"removeWorkflow\");\n            throw new TransientException(\"Error removing workflow: \" + workflowId, e);\n        }\n    }\n\n    /**\n     * Reset the workflow state by removing from the {@link ExecutionDAO} and removing this workflow\n     * from the {@link IndexDAO}.\n     *\n     * @param workflowId the workflow id to be reset\n     */\n    public void resetWorkflow(String workflowId) {\n        getWorkflowModelFromDataStore(workflowId, true);\n        executionDAO.removeWorkflow(workflowId);\n        try {\n            if (properties.isAsyncIndexingEnabled()) {\n                indexDAO.asyncRemoveWorkflow(workflowId);\n            } else {\n                indexDAO.removeWorkflow(workflowId);\n            }","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java#L449-L485","documentation":"Catch-all TransientException thrown by removeWorkflowWithExpiry when any unexpected Exception escapes its body (after recording Monitors.recordDaoError('executionDao','removeWorkflow')). It signals the removal did not complete but is likely retryable — the wrapped exception holds the real cause. Index NotFoundException is handled separately above this catch, so this fires only for other failures.","triggerScenarios":"The ExecutionDAO.removeWorkflowWithExpiry or the index removal throws a connectivity/timeout error, or an underlying store returns an unexpected exception during the TTL-based removal path.","commonSituations":"Database (Redis/Postgres/DynamoDB) temporarily unreachable during a sweep. A lock contention failure. Transient network blip to the index. Triggered by the sweeper's periodic removal of expired workflows.","solutions":["Inspect the wrapped cause in the stack trace to identify the failing store.","If transient (network/timeout), the sweeper or a manual retry will succeed on the next pass — the workflow is still in the DAO.","Check store connectivity, connection-pool sizing, and timeouts.","If it persists, verify the TTL removal is supported by the configured ExecutionDAO implementation."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    executionDAOFacade.removeWorkflowWithExpiry(workflowId, archive, ttl);\n} catch (TransientException e) {\n    // underlying store failed; safe to retry, workflow still present in DAO\n}","preventionTips":["Make workflow removal idempotent and retryable in sweepers/operators.","Monitor Monitors.recordDaoError for 'removeWorkflow' spikes as an early warning.","Keep DAO/index connection pools sized for removal bursts."],"tags":["workflow","execution-dao","removal","transient","ttl"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}