{"record":{"id":"301e4377a00189c3","repo":"apache/dolphinscheduler","slug":"serialcommand-with-executiontype-parallel-is-not","errorCode":null,"errorMessage":"\"SerialCommand with ExecutionType=PARALLEL is not supported, this shouldn't happen\"","messagePattern":"\"SerialCommand with ExecutionType=PARALLEL is not supported, this shouldn't happen\"","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/serial/WorkflowSerialCoordinator.java","lineNumber":121,"sourceCode":"                log.error(\"WorkflowSerialCoordinator error\", e);\n            } finally {\n                // sleep 5s\n                ThreadUtils.sleep(TimeUnit.SECONDS.toMillis(DEFAULT_FETCH_INTERVAL_SECONDS));\n            }\n        }\n    }\n\n    private void handleSerialCommand(SerialCommandsGroup serialCommandsGroup) {\n        try {\n            if (serialCommandsGroup.getExecutionType() == null) {\n                log.error(\"Cannot find the ExecutionType for workflow: {}-{}\",\n                        serialCommandsGroup.getWorkflowDefinitionCode(),\n                        serialCommandsGroup.getWorkflowDefinitionVersion());\n                return;\n            }\n            switch (serialCommandsGroup.getExecutionType()) {\n                case PARALLEL:\n                    throw new IllegalStateException(\n                            \"SerialCommand with ExecutionType=PARALLEL is not supported, this shouldn't happen\");\n                case SERIAL_WAIT:\n                    serialCommandWaitHandler.handle(serialCommandsGroup);\n                    break;\n                case SERIAL_DISCARD:\n                    serialCommandDiscardHandler.handle(serialCommandsGroup);\n                    break;\n                case SERIAL_PRIORITY:\n                    serialCommandPriorityHandler.handle(serialCommandsGroup);\n                    break;\n                default:\n            }\n        } catch (Exception ex) {\n            log.error(\"Handle SerialCommandsGroup: {} error\", serialCommandsGroup, ex);\n        }\n    }\n\n    private List<SerialCommandsGroup> fetchSerialCommands() {","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/serial/WorkflowSerialCoordinator.java#L103-L139","documentation":"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.","triggerScenarios":"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.","commonSituations":"Manually edited/corrupted t_ds_command rows, bugs in command grouping after version migration.","solutions":["Inspect the command rows and fix the execution_type to SERIAL_WAIT/SERIAL_DISCARD","Check the grouping code that produces SerialCommandsGroup for execution-type leaks","Re-submit the workflow with a correct execution type","Upgrade to a release fixing the grouping bug"],"exampleFix":"// before\ncase PARALLEL:\n    throw new IllegalStateException(\"not supported\");\n// after\ncase PARALLEL:\n    log.error(\"PARALLEL command in serial group, rerouting to parallel handler\");\n    parallelHandler.handle(serialCommandsGroup);\n    break;","handlingStrategy":"validation","validationCode":"if (group.getExecutionType() == ExecutionType.PARALLEL) { log.error(\"parallel command in serial group {}\", group.getWorkflowDefinitionCode()); return; }","typeGuard":"boolean isSerial(ExecutionType t) { return t == ExecutionType.SERIAL_WAIT || t == ExecutionType.SERIAL_DISCARD; }","tryCatchPattern":"try { coordinator.handleSerialCommand(group); } catch (IllegalStateException e) { log.error(\"bad execution type: {}\", e.getMessage()); quarantineGroup(group); }","preventionTips":["Never hand-edit execution_type in command tables","Verify grouping logic maps only serial execution types into serial groups","Add DB constraints/checks for execution_type values"],"tags":["java","master","serial-workflow"],"backgroundTag":"unsupported-enum-value","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}