{"record":{"id":"104342d864bd76b2","repo":"conductor-oss/conductor","slug":"error-creating-d-tasks-for-workflow-s","errorCode":null,"errorMessage":"Error creating %d tasks for workflow: %s","messagePattern":"Error creating (.+?) tasks for workflow: (.+?)","errorType":"exception","errorClass":"TransientException","httpStatus":500,"severity":"error","filePath":"cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java","lineNumber":243,"sourceCode":"                                task.getWorkflowType());\n                    });\n            batchStatement.add(\n                    updateTotalTasksStatement.bind(totalTasks, workflowUUID, DEFAULT_SHARD_ID));\n            session.execute(batchStatement);\n\n            // update the total tasks and partitions for the workflow\n            session.execute(\n                    updateTotalPartitionsStatement.bind(\n                            DEFAULT_TOTAL_PARTITIONS, totalTasks, workflowUUID));\n\n            return tasks;\n        } catch (DriverException e) {\n            Monitors.error(CLASS_NAME, \"createTasks\");\n            String errorMsg =\n                    String.format(\n                            \"Error creating %d tasks for workflow: %s\", tasks.size(), workflowId);\n            LOGGER.error(errorMsg, e);\n            throw new TransientException(errorMsg, e);\n        }\n    }\n\n    @Override\n    public void updateTask(TaskModel task) {\n        try {\n            // TODO: calculate the shard number the task belongs to\n            String taskPayload = toJson(task);\n            recordCassandraDaoRequests(\"updateTask\", task.getTaskType(), task.getWorkflowType());\n            recordCassandraDaoPayloadSize(\n                    \"updateTask\", taskPayload.length(), task.getTaskType(), task.getWorkflowType());\n            session.execute(\n                    insertTaskStatement.bind(\n                            UUID.fromString(task.getWorkflowInstanceId()),\n                            DEFAULT_SHARD_ID,\n                            task.getTaskId(),\n                            taskPayload));\n            if (task.getTaskDefinition().isPresent()","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java#L225-L261","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Verify the workflowId of each task is a valid UUID before calling createTasks.","Confirm Cassandra is reachable and the session is healthy.","Retry — TransientException is retryable; ensure createTasks is idempotent (task_lookup first) before retrying.","If batches are large, review task sharding/partition counts and tune batch size or consistency."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure every task has a UUID workflow id before createTasks\ntasks.forEach(t -> {\n    if (!isUuid(t.getWorkflowInstanceId()))\n        throw new IllegalArgumentException(\"non-UUID workflow id: \" + t.getWorkflowInstanceId());\n});","typeGuard":"static boolean isUuid(String s) {\n    try { java.util.UUID.fromString(s); return true; } catch (IllegalArgumentException e) { return false; }\n}","tryCatchPattern":"try {\n    dao.createTasks(tasks);\n} catch (TransientException e) {\n    log.warn(\"Transient createTasks failure for {} tasks; retrying idempotently\", tasks.size());\n    throw e;","preventionTips":["Validate UUID workflow IDs before createTasks.","Keep createTasks idempotent (task_lookup first) so retries are safe.","Retry TransientException with backoff and verify Cassandra health."],"tags":["cassandra","task","write","batch","transient","persistence"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}