sandynz commented on code in PR #25489:
URL: https://github.com/apache/shardingsphere/pull/25489#discussion_r1186667390


##########
kernel/data-pipeline/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/handler/CDCBackendHandler.java:
##########
@@ -110,12 +111,7 @@ public CDCResponse streamData(final String requestId, 
final StreamDataRequestBod
             tableNames = schemaTableNames;
         }
         ShardingSpherePreconditions.checkState(!tableNames.isEmpty(), () -> 
new CDCExceptionWrapper(requestId, new 
NotFindStreamDataSourceTableException()));
-        ShardingRule shardingRule = 
database.getRuleMetaData().getSingleRule(ShardingRule.class);
-        Map<String, List<DataNode>> actualDataNodesMap = new HashMap<>();
-        // TODO need support case-insensitive later
-        for (String each : tableNames) {
-            actualDataNodesMap.put(each, 
CDCTableRuleUtils.getActualDataNodes(shardingRule, each));
-        }
+        Map<String, List<DataNode>> actualDataNodesMap = 
buildDataNodesMap(database, tableNames);

Review Comment:
   `actualDataNodesMap` might be empty, we could report error to end user



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to