conductor-oss/conductor · error · TransientException

Error retrieving all workflow defs latest versions

Error message

Error retrieving all workflow defs latest versions

What it means

Thrown when a DriverException occurs during getAllWorkflowDefsLatestVersions, which reads indexed definitions and reduces them to the latest version per name using a PriorityQueue. Wrapped as TransientException - an infrastructure-level read failure interrupted the reduction.

Source

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

                    continue;
                }
                if (allWorkflowDefs.get(def.getName()) == null) {
                    allWorkflowDefs.put(
                            def.getName(),
                            new PriorityQueue<>(
                                    (WorkflowDef w1, WorkflowDef w2) ->
                                            Integer.compare(w2.getVersion(), w1.getVersion())));
                }
                allWorkflowDefs.get(def.getName()).add(def);
            }
            return allWorkflowDefs.values().stream()
                    .map(PriorityQueue::poll)
                    .collect(Collectors.toList());
        } catch (DriverException e) {
            Monitors.error(CLASS_NAME, "getAllWorkflowDefsLatestVersions");
            String errorMsg = "Error retrieving all workflow defs latest versions";
            LOGGER.error(errorMsg, e);
            throw new TransientException(errorMsg, e);
        }
    }

    private TaskDef getTaskDefFromDB(String name) {
        try {
            ResultSet resultSet = session.execute(selectTaskDefStatement.bind(name));
            recordCassandraDaoRequests("getTaskDef", name, null);
            return Optional.ofNullable(resultSet.one()).map(this::setDefaults).orElse(null);
        } catch (DriverException e) {
            Monitors.error(CLASS_NAME, "getTaskDef");
            String errorMsg = String.format("Failed to get task def: %s", name);
            LOGGER.error(errorMsg, e);
            throw new TransientException(errorMsg, e);
        }
    }

    @SuppressWarnings("unchecked")
    private List<TaskDef> getAllTaskDefsFromDB() {

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Retry the call - this is a TransientException.
  2. Confirm Cassandra connectivity and read consistency configuration.
  3. Ensure the workflow_def index tables exist and are populated.
  4. Check driver logs for the specific DriverException subtype.

Example fix

// before: single attempt
List<WorkflowDef> latest = metadataDAO.getAllWorkflowDefsLatestVersions();

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

Strategy: retry

Validate before calling

// Pre-flight: confirm session is open before computing latest versions
if (cassandraSession.isClosed()) {
    throw new IllegalStateException("Cassandra session is closed; cannot list latest workflow defs");
}

Try / catch

// Retry the latest-versions computation on transient failure
try {
    return metadataDAO.getAllWorkflowDefsLatestVersions();
} catch (TransientException e) {
    return backoffAndRetry(metadataDAO::getAllWorkflowDefsLatestVersions, 3);
}

Prevention

When it happens

Trigger: The SELECT (selectAllWorkflowDefsLatestVersionsStatement) or the in-memory version reduction's underlying reads raise a DriverException while computing latest versions.

Common situations: Computing latest versions during a cluster slowdown; read timeout on a wide index; consistency cannot be met by live replicas.

Related errors


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