{"record":{"id":"703ab5a13debaf38","repo":"apache/seatunnel","slug":"task-execution-thread-share-mode-must-in-all","errorCode":null,"errorMessage":"${TASK_EXECUTION_THREAD_SHARE_MODE} must in [ALL, OFF, PART]","messagePattern":"(.+?) must in \\[ALL, OFF, PART\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java","lineNumber":203,"sourceCode":"                                        .JOB_METRICS_BACKUP_INTERVAL\n                                        .key(),\n                                getTextContent(node)));\n            } else if (ServerConfigOptions.MasterServerConfigOptions.JOB_METRICS_PARTITION_COUNT\n                    .key()\n                    .equals(name)) {\n                engineConfig.setJobMetricsPartitionCount(\n                        getIntegerValue(\n                                ServerConfigOptions.MasterServerConfigOptions\n                                        .JOB_METRICS_PARTITION_COUNT\n                                        .key(),\n                                getTextContent(node)));\n            } else if (ServerConfigOptions.WorkerServerConfigOptions\n                    .TASK_EXECUTION_THREAD_SHARE_MODE\n                    .key()\n                    .equals(name)) {\n                String mode = getTextContent(node).toUpperCase(Locale.ROOT);\n                if (!Arrays.asList(\"ALL\", \"OFF\", \"PART\").contains(mode)) {\n                    throw new IllegalArgumentException(\n                            ServerConfigOptions.WorkerServerConfigOptions\n                                            .TASK_EXECUTION_THREAD_SHARE_MODE\n                                    + \" must in [ALL, OFF, PART]\");\n                }\n                engineConfig.setTaskExecutionThreadShareMode(ThreadShareMode.valueOf(mode));\n            } else if (ServerConfigOptions.WorkerServerConfigOptions.SLOT_SERVICE\n                    .key()\n                    .equals(name)) {\n                engineConfig.setSlotServiceConfig(parseSlotServiceConfig(node));\n            } else if (ServerConfigOptions.WorkerServerConfigOptions.TIMER_FLUSH_POOL_SIZE\n                    .key()\n                    .equals(name)) {\n                engineConfig.setTimerFlushPoolSize(\n                        getIntegerValue(\n                                ServerConfigOptions.WorkerServerConfigOptions.TIMER_FLUSH_POOL_SIZE\n                                        .key(),\n                                getTextContent(node)));\n            } else if (ServerConfigOptions.MasterServerConfigOptions.CHECKPOINT","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java#L185-L221","documentation":"When parsing the worker engine config, YamlSeaTunnelDomConfigProcessor validates that TASK_EXECUTION_THREAD_SHARE_MODE (upper-cased before the check) is one of ALL, OFF, or PART; anything else throws IllegalArgumentException because ThreadShareMode.valueOf would otherwise fail.","triggerScenarios":"parseEngineConfig encounters the thread-share-mode key with a value outside {ALL, OFF, PART} (case-insensitive), e.g. 'true', 'shared', or a typo like 'ALLL'.","commonSituations":"Porting Flink/Spark thread settings into SeaTunnel YAML; typos in hand-written config; stale docs from older versions listing different enum names.","solutions":["Set the value to exactly one of ALL, OFF, or PART (case-insensitive).","Remove the key to use the default ThreadShareMode.","Check the ServerConfigOptions.WorkerServerConfigOptions docs for accepted values in your version."],"exampleFix":"# before\ntask-execution:\n  thread-share-mode: TRUE\n# after\ntask-execution:\n  thread-share-mode: PART","handlingStrategy":"validation","validationCode":"String mode = props.getProperty(\"task-execution.thread-share-mode\", \"\").trim().toUpperCase(Locale.ROOT);\nif (!mode.isEmpty() && !List.of(\"ALL\", \"OFF\", \"PART\").contains(mode)) {\n    throw new IllegalArgumentException(\"thread-share-mode must be ALL, OFF, or PART, got \" + mode);\n}","typeGuard":null,"tryCatchPattern":"try {\n    engineConfig.setTaskExecutionThreadShareMode(ThreadShareMode.valueOf(mode));\n} catch (IllegalArgumentException e) {\n    throw new ConfigValidationException(\"thread-share-mode must be ALL|OFF|PART\", e);\n}","preventionTips":["Copy enum values only from the official docs for your version.","Add a config schema test covering worker options.","Do not port Flink/Spark setting names into SeaTunnel YAML."],"tags":["config","enum","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}