{"record":{"id":"c91bc1f69987d252","repo":"apache/seatunnel","slug":"unknown-taskgroup-state-executionstate","errorCode":null,"errorMessage":"Unknown TaskGroup State: ${executionState}","messagePattern":"Unknown TaskGroup State: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/PhysicalVertex.java","lineNumber":638,"sourceCode":"                                this.taskFullName,\n                                ExecutionState.FAILED,\n                                errorByPhysicalVertex.get()));\n                taskFuture.complete(\n                        new TaskExecutionState(\n                                taskGroupLocation,\n                                ExecutionState.FAILED,\n                                errorByPhysicalVertex.get()));\n                return;\n            case FINISHED:\n                stopPhysicalVertex();\n                taskFuture.complete(\n                        new TaskExecutionState(\n                                taskGroupLocation,\n                                ExecutionState.FINISHED,\n                                errorByPhysicalVertex.get()));\n                return;\n            default:\n                throw new IllegalArgumentException(\n                        \"Unknown TaskGroup State: \" + getExecutionState());\n        }\n    }\n\n    public void makeTaskGroupFailing(Throwable err) {\n        errorByPhysicalVertex.compareAndSet(null, ExceptionUtils.getMessage(err));\n        updateTaskState(ExecutionState.FAILING);\n    }\n}\n","sourceCodeStart":620,"sourceCodeEnd":648,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/PhysicalVertex.java#L620-L648","documentation":"PhysicalVertex.stateProcess switches over the task group's ExecutionState; an unrecognized value falls through to this IllegalArgumentException. It indicates the vertex state machine reached a state the processing loop cannot drive, typically an engine inconsistency or an enum value missing from the switch.","triggerScenarios":"updateTaskState writes an ExecutionState not handled by stateProcess's cases; restoreExecutionState resumes processing while the vertex sits in an uncovered state; new ExecutionState constants added without extending the switch.","commonSituations":"Engine version mismatch after upgrade introducing new enum values; corrupted runningJobStateIMap entries; custom plugin/task code forcing unusual states.","solutions":["Align all engine server/worker jar versions and restart the cluster","Inspect runningJobStateIMap for the offending TaskGroupLocation's stored state","When extending ExecutionState, add matching cases to PhysicalVertex.stateProcess","Check task logs to find which updateTaskState call wrote the unexpected state"],"exampleFix":"// before\ncase FAILED:\n    handleError();\n    break;\n// after\ncase FAILED:\ncase CANCELED:\n    handleError();\n    break;","handlingStrategy":"try-catch","validationCode":"Set<ExecutionState> handled = Set.of(CREATED, SCHEDULED, RUNNING, FINISHED, FAILED, CANCELED, ...);\nif (!handled.contains(vertex.getExecutionState())) { log.warn(\"unhandled state\"); }","typeGuard":"boolean isHandled(ExecutionState s) { return s != null && HANDLED_STATES.contains(s); }","tryCatchPattern":"try { restoreExecutionState(); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Unknown TaskGroup State\")) { log.error(\"task group state not handled\", e); } else { throw e; } }","preventionTips":["Keep enum handling exhaustive","Match engine versions across nodes","Validate stored IMap state on recovery"],"tags":["zeta-engine","task-group","switch-default","state-machine"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}