Closed StarHuzy closed 9 months ago
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Bug Report
I used a single database sharding tables use local transaction mode I have configured some tables
t_member
t_order
t_order_time
t_product
What I designed is Automatically split tableStrategy by
tenant_id
this is my configurationI customized the allocation calculation class
dataSources: testApp: dataSourceClassName: com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://127.0.0.1:3306/app_test username: root password: 123456 rules:
节点表添加下初始的表,后续会在新增租户的时候新增表且刷新节点
t_product: # 分表,逻辑表名
节点表添加下初始的表,后续会在新增租户的时候新增表且刷新节点
t_order: # 分表,逻辑表名
节点表添加下初始的表,后续会在新增租户的时候新增表且刷新节点
t_order_item: # 分表,逻辑表名
节点表添加下初始的表,后续会在新增租户的时候新增表且刷新节点
分片算法配置
shardingAlgorithms: real-data-inline: # 分片算法名称 type: CLASS_BASED #自定义策略 props: strategy: standard
包名+类名
bindingTables:
Which version of ShardingSphere did you use?
shardingsphere-jdbc 5.3.2 + JDK 17 + spring-boot 2.7.14
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
JOIN QUERY
with two tablesActual behavior
actualDataNodes Automatically loaded
JOIN QUERY
with two tables with An exception has occurredI query
tenant_id = 2
By viewing the print below ,actualDataNodeshas been dynamically loadedBut if I start configuring it
After execution, there will be no exceptions But this
actualDataNode
s is the same as the previous methodReason analyze (If you can)