apache/dolphinscheduler · error · IllegalStateException

"SerialCommand with ExecutionType=PARALLEL is not supported,

Error message

"SerialCommand with ExecutionType=PARALLEL is not supported, this shouldn't happen"

What it means

handleSerialCommand dispatches grouped serial commands by execution type; PARALLEL is not a serial execution type, so encountering it in a serial command group means corrupted grouping data and throws IllegalStateException.

Source

Thrown at dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/serial/WorkflowSerialCoordinator.java:121

                log.error("WorkflowSerialCoordinator error", e);
            } finally {
                // sleep 5s
                ThreadUtils.sleep(TimeUnit.SECONDS.toMillis(DEFAULT_FETCH_INTERVAL_SECONDS));
            }
        }
    }

    private void handleSerialCommand(SerialCommandsGroup serialCommandsGroup) {
        try {
            if (serialCommandsGroup.getExecutionType() == null) {
                log.error("Cannot find the ExecutionType for workflow: {}-{}",
                        serialCommandsGroup.getWorkflowDefinitionCode(),
                        serialCommandsGroup.getWorkflowDefinitionVersion());
                return;
            }
            switch (serialCommandsGroup.getExecutionType()) {
                case PARALLEL:
                    throw new IllegalStateException(
                            "SerialCommand with ExecutionType=PARALLEL is not supported, this shouldn't happen");
                case SERIAL_WAIT:
                    serialCommandWaitHandler.handle(serialCommandsGroup);
                    break;
                case SERIAL_DISCARD:
                    serialCommandDiscardHandler.handle(serialCommandsGroup);
                    break;
                case SERIAL_PRIORITY:
                    serialCommandPriorityHandler.handle(serialCommandsGroup);
                    break;
                default:
            }
        } catch (Exception ex) {
            log.error("Handle SerialCommandsGroup: {} error", serialCommandsGroup, ex);
        }
    }

    private List<SerialCommandsGroup> fetchSerialCommands() {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Inspect the command rows and fix the execution_type to SERIAL_WAIT/SERIAL_DISCARD
  2. Check the grouping code that produces SerialCommandsGroup for execution-type leaks
  3. Re-submit the workflow with a correct execution type
  4. Upgrade to a release fixing the grouping bug

Example fix

// before
case PARALLEL:
    throw new IllegalStateException("not supported");
// after
case PARALLEL:
    log.error("PARALLEL command in serial group, rerouting to parallel handler");
    parallelHandler.handle(serialCommandsGroup);
    break;
Defensive patterns

Strategy: validation

Validate before calling

if (group.getExecutionType() == ExecutionType.PARALLEL) { log.error("parallel command in serial group {}", group.getWorkflowDefinitionCode()); return; }

Type guard

boolean isSerial(ExecutionType t) { return t == ExecutionType.SERIAL_WAIT || t == ExecutionType.SERIAL_DISCARD; }

Try / catch

try { coordinator.handleSerialCommand(group); } catch (IllegalStateException e) { log.error("bad execution type: {}", e.getMessage()); quarantineGroup(group); }

Prevention

When it happens

Trigger: A serial command group whose ExecutionType is PARALLEL — i.e. commands grouped under serial coordination carry an incompatible execution type, typically from bad DB rows or grouping logic bugs.

Common situations: Manually edited/corrupted t_ds_command rows, bugs in command grouping after version migration.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/301e4377a00189c3. Report an issue: GitHub.