{"record":{"id":"6d30a8df414c64ee","repo":"apache/dolphinscheduler","slug":"unsupported-command-fetch-strategy-type-type","errorCode":null,"errorMessage":"unsupported command fetch strategy type: ${type}","messagePattern":"unsupported command fetch strategy type: (.+?)","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/command/CommandFetcherConfiguration.java","lineNumber":45,"sourceCode":"import org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\npublic class CommandFetcherConfiguration {\n\n    @Bean\n    public ICommandFetcher commandFetcher(MasterConfig masterConfig,\n                                          MasterSlotManager masterSlotManager,\n                                          CommandDao commandDao) {\n        CommandFetchStrategy commandFetchStrategy =\n                checkNotNull(masterConfig.getCommandFetchStrategy(), \"command fetch strategy is null\");\n        switch (commandFetchStrategy.getType()) {\n            case ID_SLOT_BASED:\n                CommandFetchStrategy.IdSlotBasedFetchConfig idSlotBasedFetchConfig =\n                        (CommandFetchStrategy.IdSlotBasedFetchConfig) commandFetchStrategy.getConfig();\n                return new IdSlotBasedCommandFetcher(idSlotBasedFetchConfig, masterSlotManager, commandDao);\n            default:\n                throw new IllegalArgumentException(\n                        \"unsupported command fetch strategy type: \" + commandFetchStrategy.getType());\n        }\n    }\n}\n","sourceCodeStart":27,"sourceCodeEnd":50,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/command/CommandFetcherConfiguration.java#L27-L50","documentation":"Thrown when the configured command fetch strategy type is not handled by CommandFetcherConfiguration.commandFetcher. Currently only ID_SLOT_BASED is supported; the switch's default branch rejects everything else with this IllegalArgumentException. It guards against a configured-but-unknown fetch strategy at master startup.","triggerScenarios":"Configuring the master command fetch strategy to any value other than ID_SLOT_BASED, e.g. a legacy type name or typo in application.yaml, or supplying a custom enum value via code.","commonSituations":"Following outdated docs that mention removed fetch strategies, hand-editing YAML with wrong casing, or newer config files used with an older build.","solutions":["Set the command fetch strategy type to ID_SLOT_BASED in the master configuration","Verify the value against the CommandFetchStrategy type enum in the source","Remove stale/legacy strategy keys left from an upgrade"],"exampleFix":"// before\nmaster:\n  command-fetch-strategy:\n    type: QUEUE_BASED\n// after\nmaster:\n  command-fetch-strategy:\n    type: ID_SLOT_BASED","handlingStrategy":"validation","validationCode":"if (!\"ID_SLOT_BASED\".equals(configuredStrategyType)) {\n    throw new IllegalArgumentException(\"only ID_SLOT_BASED is supported\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    CommandFetcher fetcher = configuration.commandFetcher();\n} catch (IllegalArgumentException e) {\n    log.error(\"Unsupported fetch strategy, using IdSlotBasedCommandFetcher default\");\n}","preventionTips":["Use only ID_SLOT_BASED in master config","Validate config at startup with a fail-fast check","Review release notes for removed fetch strategy types before upgrading"],"tags":["configuration","enum","master-server"],"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"}