{"record":{"id":"93cd37019c05aeaa","repo":"apache/seatunnel","slug":"illegal-argument-93cd37","errorCode":"ILLEGAL_ARGUMENT","errorMessage":"Duplicate table_path found: %s. Please ensure each table configuration has a unique table_path.","messagePattern":"Duplicate table_path found: (.+?)\\. Please ensure each table configuration has a unique table_path\\.","errorType":"error_code","errorClass":"RedisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/source/RedisSource.java","lineNumber":68,"sourceCode":"        this.sourceTablesMap = createSourceTablesMap(readonlyConfig);\n    }\n\n    /**\n     * Create source tables map from configuration, supporting both single and multi-table modes.\n     *\n     * @param readonlyConfig Configuration\n     * @return Map of TablePath to RedisTableConfig\n     */\n    private Map<TablePath, RedisTableConfig> createSourceTablesMap(ReadonlyConfig readonlyConfig) {\n        List<RedisTableConfig> tableConfigs = RedisTableConfig.of(readonlyConfig);\n        Map<TablePath, RedisTableConfig> tablesMap = new LinkedHashMap<>();\n\n        for (RedisTableConfig tableConfig : tableConfigs) {\n            TablePath tablePath = tableConfig.getTablePath();\n\n            // Check for duplicate TablePath\n            if (tablesMap.containsKey(tablePath)) {\n                throw new RedisConnectorException(\n                        CommonErrorCode.ILLEGAL_ARGUMENT,\n                        String.format(\n                                \"Duplicate table_path found: %s. Please ensure each table configuration has a unique table_path.\",\n                                tablePath));\n            }\n\n            tablesMap.put(tablePath, tableConfig);\n        }\n\n        return tablesMap;\n    }\n\n    @Override\n    public Boundedness getBoundedness() {\n        return Boundedness.BOUNDED;\n    }\n\n    @Override","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/source/RedisSource.java#L50-L86","documentation":"RedisSource.createSourceTablesMap builds a map from TablePath to RedisTableConfig for multi-table source configs. It throws RedisConnectorException with ILLEGAL_ARGUMENT when two table configs resolve to the same table_path, because each Redis table must map to exactly one configuration entry.","triggerScenarios":"A multi-table Redis source declares two table blocks whose key/key_pattern/database resolve to an identical TablePath; createSourceTablesMap runs at RedisSource construction time and fails the job immediately.","commonSituations":"Copy-pasted table blocks where table_path was not changed; generated multi-table configs where distinct key patterns collapse to the same path; template expansion producing duplicate entries.","solutions":["Make each table block's table_path unique in the source config","Review the generated/templated config for duplicated table_path entries","If two tables genuinely need the same path, merge their key patterns into a single table config"],"exampleFix":"// before\ntables = [{table_path = \"db0:key:*\"}, {table_path = \"db0:key:*\"}]\n// after\ntables = [{table_path = \"db0:key:*\"}, {table_path = \"db0:other:*\"}]","handlingStrategy":"validation","validationCode":"Set<String> seen = new HashSet<>();\nfor (Map<String,Object> t : tables) { if (!seen.add((String)t.get(\"table_path\"))) throw new IllegalArgumentException(\"Duplicate table_path: \" + t.get(\"table_path\")); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["De-duplicate table blocks in config generation templates","Include table_path in config linting rules","Review multi-table configs after copy-paste edits"],"tags":["redis","source","multi-table","duplicate"],"backgroundTag":"duplicate-config-key","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"}