conductor-oss/conductor · error · TransientException

Failed to get all task defs

Error message

Failed to get all task defs

What it means

Thrown when a DriverException occurs during getAllTaskDefsFromDB, which scans the task_def table by the TASK_DEFS_KEY partition and maps each row through setDefaults. Wrapped as TransientException - the full task-def listing failed at the driver level.

Source

Thrown at cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraMetadataDAO.java:369

            throw new TransientException(errorMsg, e);
        }
    }

    @SuppressWarnings("unchecked")
    private List<TaskDef> getAllTaskDefsFromDB() {
        try {
            ResultSet resultSet = session.execute(selectAllTaskDefsStatement.bind(TASK_DEFS_KEY));
            List<Row> rows = resultSet.all();
            if (rows.size() == 0) {
                LOGGER.info("No task definitions were found.");
                return Collections.EMPTY_LIST;
            }
            return rows.stream().map(this::setDefaults).collect(Collectors.toList());
        } catch (DriverException e) {
            Monitors.error(CLASS_NAME, "getAllTaskDefs");
            String errorMsg = "Failed to get all task defs";
            LOGGER.error(errorMsg, e);
            throw new TransientException(errorMsg, e);
        }
    }

    private List<WorkflowDef> getAllWorkflowDefVersions(String name) {
        try {
            ResultSet resultSet =
                    session.execute(selectAllWorkflowDefVersionsByNameStatement.bind(name));
            recordCassandraDaoRequests("getAllWorkflowDefVersions", "n/a", name);
            List<Row> rows = resultSet.all();
            if (rows.size() == 0) {
                LOGGER.info("Not workflow definitions were found for : {}", name);
                return null;
            }
            return rows.stream()
                    .map(
                            row ->
                                    readValue(
                                            row.getString(WORKFLOW_DEFINITION_KEY),

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Retry the listing call.
  2. Verify Cassandra connectivity and the task_def table/keyspace.
  3. Tune read timeouts if the task-def partition is large.
  4. Check the underlying DriverException for the precise failure.

Example fix

// before: one-shot listing
List<TaskDef> all = metadataDAO.getAllTaskDefs();

// after: retry transient failures
List<TaskDef> all = RetryUtils.retryOn(TransientException.class, 3,
        Duration.ofMillis(200), metadataDAO::getAllTaskDefs);
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight: check session health before listing all task defs
if (cassandraSession.isClosed()) {
    throw new IllegalStateException("Cassandra session is closed; cannot list task defs");
}

Try / catch

// Retry the task-def listing on transient failure
try {
    return metadataDAO.getAllTaskDefs();
} catch (TransientException e) {
    return backoffAndRetry(metadataDAO::getAllTaskDefs, 3);
}

Prevention

When it happens

Trigger: session.execute(selectAllTaskDefsStatement.bind(TASK_DEFS_KEY)) raises a DriverException, or iterating resultSet.all() hits a driver error during the scan.

Common situations: Listing all task definitions during cluster degradation; wide partition read timing out; consistency cannot be met; session closed mid-scan.

Related errors


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