{"record":{"id":"6a2629472d7f4490","repo":"apache/seatunnel","slug":"config-validation-failed-6a2629","errorCode":"CONFIG_VALIDATION_FAILED","errorMessage":"In multi-table mode, option 'discovery_mode' must be consistent across tables.","messagePattern":"In multi-table mode, option 'discovery_mode' must be consistent across tables\\.","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSource.java","lineNumber":170,"sourceCode":"                tableIds.add(config.getCatalogTable().getTableId().toTablePath().toString());\n            }\n        }\n        return tableIds;\n    }\n\n    private FileDiscoveryMode resolveDiscoveryMode() {\n        List<BaseFileSourceConfig> configs =\n                baseMultipleTableFileSourceConfig.getFileSourceConfigs();\n        if (configs == null || configs.isEmpty()) {\n            return FileDiscoveryMode.ONCE;\n        }\n        FileDiscoveryMode mode =\n                configs.get(0).getBaseFileSourceConfig().get(FileBaseSourceOptions.DISCOVERY_MODE);\n        for (BaseFileSourceConfig config : configs) {\n            FileDiscoveryMode currentMode =\n                    config.getBaseFileSourceConfig().get(FileBaseSourceOptions.DISCOVERY_MODE);\n            if (currentMode != mode) {\n                throw new FileConnectorException(\n                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                        \"In multi-table mode, option '\"\n                                + FileBaseSourceOptions.DISCOVERY_MODE.key()\n                                + \"' must be consistent across tables.\");\n            }\n        }\n        if (mode != FileDiscoveryMode.CONTINUOUS) {\n            for (BaseFileSourceConfig config : configs) {\n                FilePostSyncAction action =\n                        config.getBaseFileSourceConfig()\n                                .get(FileBaseSourceOptions.POST_SYNC_ACTION);\n                if (action == FilePostSyncAction.NONE) {\n                    continue;\n                }\n                throw new FileConnectorException(\n                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                        \"post_sync_action only supports discovery_mode=continuous. \"\n                                + \"Please set post_sync_action=none or switch discovery_mode to continuous.\");","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseMultipleTableFileSource.java#L152-L188","documentation":"BaseMultipleTableFileSource.resolveDiscoveryMode requires every table's config to use the same discovery_mode. When the first table's DISCOVERY_MODE differs from any other table's, it throws CONFIG_VALIDATION_FAILED telling you the option must be consistent across tables.","triggerScenarios":"A multi-table file source (multiple tables/paths configured) where at least one table sets discovery_mode (e.g. `create_once`) differently from the first table (e.g. `continuous`); resolveDiscoveryMode is invoked by getBoundedness, createEnumerator, and restoreEnumerator.","commonSituations":"Merging per-table config files with different discovery_mode values; adding a new table entry copied from a batch job into a streaming job; typo making one table fall back to a different default.","solutions":["Set the same discovery_mode in every table's base file source config.","Decide the job's boundedness (batch vs streaming) first, then apply one mode to all tables.","Search all table configs for `discovery_mode` and normalize them.","Resubmit; the check runs again on getBoundedness/createEnumerator."],"exampleFix":"// before\ntable1: discovery_mode = continuous\ntable2: discovery_mode = create_once\n// after\ntable1: discovery_mode = continuous\ntable2: discovery_mode = continuous","handlingStrategy":"validation","validationCode":"Set<String> modes = tableConfigs.stream()\n    .map(c -> c.getString(\"discovery_mode\"))\n    .collect(Collectors.toSet());\nif (modes.size() > 1) {\n    throw new IllegalArgumentException(\"All tables must share one discovery_mode, got: \" + modes);\n}","typeGuard":null,"tryCatchPattern":"try {\n    // create multi-table source\n} catch (FileConnectorException e) {\n    if (SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED.equals(e.getErrorCode())\n            && e.getMessage().contains(\"discovery_mode\")) {\n        throw new IllegalStateException(\"Normalize discovery_mode across all table configs\", e);\n    }\n    throw e;\n}","preventionTips":["Generate multi-table configs from one template with a single discovery_mode variable.","Grep generated configs for discovery_mode drift before submission.","Document that boundedness is job-level, not per-table."],"tags":["config","multi-table","validation"],"backgroundTag":"conflicting-config-options","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"}