865685519 opened a new issue, #34480:
URL: https://github.com/apache/shardingsphere/issues/34480
## Question
The broadcast table is configured:t_dict
Specifies that only server-order3 and server-order0 are broadcast, but the
other server-order1 and server-user still execute the broadcast sql。
shardingsphere-jdbc-core-spring-boot-starter : 5.2.1
The configuration is as follows
`
spring:
shardingsphere:
props:
sql-show: true
mode:
type: Standalone
repository:
type: JDBC
datasource:
names: server-user,server-order0,server-order1,server-order3
server-user:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url:
jdbc:mysql://192.168.4.36:3307/db_user?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: lxg123456
server-order0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url:
jdbc:mysql://192.168.4.36:3306/db_order?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
server-order1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url:
jdbc:mysql://192.168.4.36:3307/db_order?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: lxg123456
server-order3:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url:
jdbc:mysql://192.168.4.36:3307/db_order?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: lxg123456
rules:
sharding:
broadcast-tables:
- t_dict
key-generators:
alg_snowflake:
type: SNOWFLAKE
props:
worker-id: 123
max-tolerate-time-difference-milliseconds: 10
max-vibration-offset: 3
binding-tables:
- t_order,t_order_item
tables:
t_dict:
actual-data-nodes: server-order3.t_dict,server-order0.t_dict
t_order_item:
actual-data-nodes: server-order$->{0..1}.t_order_item$->{0..1}
database-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: alg_inline_userid
table-strategy:
standard:
sharding-column: order_no
sharding-algorithm-name: alg_inline_order
t_user:
actual-data-nodes: server-user.t_user
t_order:
actual-data-nodes: server-order$->{0..1}.t_order$->{0..1}
database-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: alg_inline_userid
table-strategy:
standard:
sharding-column: order_no
sharding-algorithm-name: alg_inline_order
sharding-algorithms:
alg_inline_userid:
type: INLINE
props:
algorithm-expression: server-order$->{user_id % 2}
alg_inline_order:
type: HASH_MOD
props:
sharding-count: 2
default-key-generate-strategy:
column: id
key-generator-name: alg_snowflake
`
--
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]