conductor-oss/conductor · error · TransientException

Failed to remove workflow: %s

Error message

Failed to remove workflow: %s

What it means

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.

Source

Thrown at cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java:477

    @Override
    public boolean removeWorkflow(String workflowId) {
        WorkflowModel workflow = getWorkflow(workflowId, true);
        boolean removed = false;
        // TODO: calculate number of shards and iterate
        if (workflow != null) {
            try {
                recordCassandraDaoRequests("removeWorkflow", "n/a", workflow.getWorkflowName());
                ResultSet resultSet =
                        session.execute(
                                deleteWorkflowStatement.bind(
                                        UUID.fromString(workflowId), DEFAULT_SHARD_ID));
                removed = resultSet.wasApplied();
            } catch (DriverException e) {
                Monitors.error(CLASS_NAME, "removeWorkflow");
                String errorMsg = String.format("Failed to remove workflow: %s", workflowId);
                LOGGER.error(errorMsg, e);
                throw new TransientException(errorMsg);
            }
            workflow.getTasks().forEach(this::removeTaskLookup);
        }
        return removed;
    }

    /**
     * This is a dummy implementation and this feature is not yet implemented for Cassandra backed
     * Conductor
     */
    @Override
    public boolean removeWorkflowWithExpiry(String workflowId, int ttlSeconds) {
        throw new UnsupportedOperationException(
                "This method is not currently implemented in CassandraExecutionDAO. Please use RedisDAO mode instead now for using TTLs.");
    }

    /**
     * No-op: Cassandra does not maintain a pending-workflows structure, so there is nothing to

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Ensure the workflowId is a valid UUID.
  2. Confirm Cassandra health and retry the remove.
  3. After a successful retry, verify task_lookup rows for the workflow's tasks are gone (cleanup runs after the delete).
  4. Preserve the cause when rethrowing for better diagnostics.

Example fix

// before
throw new TransientException(errorMsg);

// after
throw new TransientException(errorMsg, e);
Defensive patterns

Strategy: validation

Validate before calling

// Ensure workflow id is a UUID before removeWorkflow
if (!isUuid(workflowId))
    throw new IllegalArgumentException("non-UUID workflow id: " + workflowId);

Type guard

static boolean isUuid(String s) {
    try { java.util.UUID.fromString(s); return true; } catch (IllegalArgumentException e) { return false; }
}

Try / catch

try {
    return dao.removeWorkflow(workflowId);
} catch (TransientException e) {
    log.warn("Transient removeWorkflow failure for {}; retrying", workflowId);
    throw e;

Prevention

When it happens

Trigger: Calling removeWorkflow(String workflowId) when Cassandra is unavailable, the workflowId is not a valid UUID, or the delete times out / fails consistency.

Common situations: 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).

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/9be9b9d577e6dddd. Report an issue: GitHub.