You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "azexcy (via GitHub)" <gi...@apache.org> on 2023/05/06 07:58:56 UTC

[GitHub] [shardingsphere] azexcy opened a new pull request, #25489: CDC support single table

azexcy opened a new pull request, #25489:
URL: https://github.com/apache/shardingsphere/pull/25489

   
   
   Changes proposed in this pull request:
     - CDC support single table
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz merged pull request #25489: CDC support single table

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz merged PR #25489:
URL: https://github.com/apache/shardingsphere/pull/25489


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on a diff in pull request #25489: CDC support single table

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org