liuxiaocs7 commented on issue #24874:
URL: 
https://github.com/apache/shardingsphere/issues/24874#issuecomment-1486190511

   > ```
   > 11:55:39.913 [nioEventLoopGroup-2-1] INFO 
org.apache.shardingsphere.data.pipeline.cdc.client.handler.LoginRequestHandler 
- Server greeting result, server version: 5.3.2-SNAPSHOT, protocol version: 1
   > 11:55:39.958 [nioEventLoopGroup-2-1] INFO 
org.apache.shardingsphere.data.pipeline.cdc.client.handler.LoginRequestHandler 
- Login success, username root
   > 11:55:39.971 [nioEventLoopGroup-2-1] ERROR 
org.apache.shardingsphere.data.pipeline.cdc.client.handler.CDCRequestHandler - 
received error response status: FAILED
   > error_code: "HY000"
   > error_message: "Rule `ShardingRule` should have and only have one 
instance."
   > ```
   > 
   > Could you check you sharding rule config? also you can debug at 
`org.apache.shardingsphere.proxy.backend.handler.cdc.CDCBackendHandler#streamData`,
 and tell us why sharding rule isn't 1
   
   
   I would like to ask whether the sharding rule config is in 
`config-sharding.yaml` and this code blocks:
   
   ```
   #rules:
   #- !SHARDING
   #  tables:
   #    t_order:
   #      actualDataNodes: ds_${0..1}.t_order_${0..1}
   #      tableStrategy:
   #        standard:
   #          shardingColumn: order_id
   #          shardingAlgorithmName: t_order_inline
   #      keyGenerateStrategy:
   #        column: order_id
   #        keyGeneratorName: snowflake
   #      auditStrategy:
   #        auditorNames:
   #          - sharding_key_required_auditor
   #        allowHintDisable: true
   #    t_order_item:
   #      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
   #      tableStrategy:
   #        standard:
   #          shardingColumn: order_id
   #          shardingAlgorithmName: t_order_item_inline
   #      keyGenerateStrategy:
   #        column: order_item_id
   #        keyGeneratorName: snowflake
   #  bindingTables:
   #    - t_order,t_order_item
   #  defaultDatabaseStrategy:
   #    standard:
   #      shardingColumn: user_id
   #      shardingAlgorithmName: database_inline
   #  defaultTableStrategy:
   #    none:
   #  defaultAuditStrategy:
   #    auditorNames:
   #      - sharding_key_required_auditor
   #    allowHintDisable: true
   #
   #  shardingAlgorithms:
   #    database_inline:
   #      type: INLINE
   #      props:
   #        algorithm-expression: ds_${user_id % 2}
   #    t_order_inline:
   #      type: INLINE
   #      props:
   #        algorithm-expression: t_order_${order_id % 2}
   #    t_order_item_inline:
   #      type: INLINE
   #      props:
   #        algorithm-expression: t_order_item_${order_id % 2}
   #
   #  keyGenerators:
   #    snowflake:
   #      type: SNOWFLAKE
   #
   #  auditors:
   #    sharding_key_required_auditor:
   #      type: DML_SHARDING_CONDITIONS
   ```
   


-- 
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