conductor-oss/conductor · error · TransientException

Error creating %d tasks for workflow: %s

Error message

Error creating %d tasks for workflow: %s

What it means

Thrown by CassandraExecutionDAO.createTasks when batch-inserting tasks fails. DriverException during the createTasks transaction (task_lookup insert + workflows table batch + updateTotalPartitions) is wrapped in TransientException. The message reports task count and workflow id.

Source

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

                                task.getWorkflowType());
                    });
            batchStatement.add(
                    updateTotalTasksStatement.bind(totalTasks, workflowUUID, DEFAULT_SHARD_ID));
            session.execute(batchStatement);

            // update the total tasks and partitions for the workflow
            session.execute(
                    updateTotalPartitionsStatement.bind(
                            DEFAULT_TOTAL_PARTITIONS, totalTasks, workflowUUID));

            return tasks;
        } catch (DriverException e) {
            Monitors.error(CLASS_NAME, "createTasks");
            String errorMsg =
                    String.format(
                            "Error creating %d tasks for workflow: %s", tasks.size(), workflowId);
            LOGGER.error(errorMsg, e);
            throw new TransientException(errorMsg, e);
        }
    }

    @Override
    public void updateTask(TaskModel task) {
        try {
            // TODO: calculate the shard number the task belongs to
            String taskPayload = toJson(task);
            recordCassandraDaoRequests("updateTask", task.getTaskType(), task.getWorkflowType());
            recordCassandraDaoPayloadSize(
                    "updateTask", taskPayload.length(), task.getTaskType(), task.getWorkflowType());
            session.execute(
                    insertTaskStatement.bind(
                            UUID.fromString(task.getWorkflowInstanceId()),
                            DEFAULT_SHARD_ID,
                            task.getTaskId(),
                            taskPayload));
            if (task.getTaskDefinition().isPresent()

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Verify the workflowId of each task is a valid UUID before calling createTasks.
  2. Confirm Cassandra is reachable and the session is healthy.
  3. Retry — TransientException is retryable; ensure createTasks is idempotent (task_lookup first) before retrying.
  4. If batches are large, review task sharding/partition counts and tune batch size or consistency.
Defensive patterns

Strategy: validation

Validate before calling

// Ensure every task has a UUID workflow id before createTasks
tasks.forEach(t -> {
    if (!isUuid(t.getWorkflowInstanceId()))
        throw new IllegalArgumentException("non-UUID workflow id: " + t.getWorkflowInstanceId());
});

Type guard

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

Try / catch

try {
    dao.createTasks(tasks);
} catch (TransientException e) {
    log.warn("Transient createTasks failure for {} tasks; retrying idempotently", tasks.size());
    throw e;

Prevention

When it happens

Trigger: Calling createTasks(List<TaskModel>) when Cassandra is unavailable, the batch write times out, consistency cannot be met, or a task's workflowId is not a valid UUID (UUID.fromString fails inside the try).

Common situations: Cassandra connectivity loss or write timeout under batch load. Workflow ID is non-UUID (mismatched ID generator). Schema drift in the task_lookup/workflows tables. Batch too large.

Related errors


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