You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:42:22 UTC
[GitHub] [shardingsphere] ziliangzeng opened a new issue, #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
ziliangzeng opened a new issue, #14475:
URL: https://github.com/apache/shardingsphere/issues/14475
## Bug Report
### Which version of ShardingSphere did you use?
5.0.0
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
broadcastTables show effect
### Actual behavior
out of action
### Reason analyze (If you can)
if table donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1,change the tables : t_order2: actualDataNodes: ds_0.t_order2
2, Execute broadcasttable sql(insert) statement
### Example codes for reproduce this issue (such as a github link).
``` yaml
dataSources:
ds_0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost:3306/ds0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
username: root
password: 123456
connectionTimeout: 30000
idleTimeout: 30000
maximumPoolSize: 10
maxLifetime: 1800000
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost:3306/ds1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
username: root
password: 123456
connectionTimeout: 30000
idleTimeout: 30000
maximumPoolSize: 10
maxLifetime: 1800000
rules:
- !SHARDING
tables:
#t_order1:
#actualDataNodes: ds_${0..1}.t_order1
t_order1:
actualDataNodes: ds_0.t_order1
broadcastTables:
[
t_order2
]
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: database_inline
defaultTableStrategy:
none:
shardingAlgorithms:
database_inline:
type: INLINE
props:
algorithm-expression: ds_${order_id % 2}
keyGenerators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
props:
sql-show: false
```
## creae table
```sql
CREATE TABLE `t_order1` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NULL DEFAULT NULL,
`order_id` int NULL DEFAULT NULL,
`cloumn` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1233452 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
CREATE TABLE `t_order2` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NULL DEFAULT NULL,
`order_id` int NULL DEFAULT NULL,
`cloumn` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1233452 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
```
## insert sql
```
insert into t_order2 (id,user_id,order_id,cloumn) values (7,7,7,7)
```
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #14475:
URL: https://github.com/apache/shardingsphere/issues/14475#issuecomment-1365570837
This issue has been inactive for a while, I'm closing it for now.
--
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] github-actions[bot] commented on issue #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #14475:
URL: https://github.com/apache/shardingsphere/issues/14475#issuecomment-1272350484
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
--
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] TeslaCN closed issue #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
URL: https://github.com/apache/shardingsphere/issues/14475
--
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] github-actions[bot] closed issue #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #14475: if tables : anytable donot set like 'ds_${0..1} ' include all the dataSources, the broadcastTables will out of action !
URL: https://github.com/apache/shardingsphere/issues/14475
--
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