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 2020/11/19 06:38:31 UTC
[GitHub] [shardingsphere] xiaoliu10 opened a new issue #8217: proxy excute insert sql but insert into all physical table
xiaoliu10 opened a new issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217
three database zookeeper_0, zookeeper_1, zookeeper_2. shardingColumn order_id, algorithm use hash_mod
one database three physical table t_order_0, t_order_1, t_order_2 , shardingColumn user_id, algorithm use hash_mode
now, execute insert into `t_order` values('admin', now(), now()),
the expected result is to route to one of the nine tables, but all nine tables insert the same piece of data
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] xiaoliu10 commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
xiaoliu10 commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-734854598
1. 5.0.0-alpha
2. I use Navicat to connect to sharding proxy. How can I get SQL logs
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-735358076
Enable sql-show to log your actual SQL
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] xiaoliu10 commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
xiaoliu10 commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-730174580
this is rules config:
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: zookeeper_${[0,1,2]}.t_order_${[0,1,2]}
databaseStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
tableStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
keyGenerateStrategy:
column: order_id
keyGeneratorName: increment
t_order_item:
actualDataNodes: zookeeper_${0..2}.t_order_item_${0..2}
databaseStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
tableStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
bindingTables:
- t_order,t_order_item
broadcastTables:
- t_config
defaultTableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
shardingAlgorithms:
hash_mod:
type: HASH_MOD
props:
sharding-count: '3'
keyGenerators:
increment:
type: SNOWFLAKE
props:
worker-id: 1
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] kimmking commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-730171588
what is your config and logic/actual sql?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] xiaoliu10 commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
xiaoliu10 commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-730173705
this is datasource config
dataSources:
zookeeper_0:
url: jdbc:mysql://xxxx:3306/zookeeper_0?useUnicode=true
zookeeper_1:
url: jdbc:mysql://xxxx:3306/zookeeper_1?useUnicode=true
zookeeper_2:
url: jdbc:mysql://xxxx:3306/zookeeper_2?useUnicode=true
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] xiaoliu10 edited a comment on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
xiaoliu10 edited a comment on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-730174580
this is rules config:
```yaml
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: zookeeper_${[0,1,2]}.t_order_${[0,1,2]}
databaseStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
tableStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
keyGenerateStrategy:
column: order_id
keyGeneratorName: increment
t_order_item:
actualDataNodes: zookeeper_${0..2}.t_order_item_${0..2}
databaseStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
tableStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
bindingTables:
- t_order,t_order_item
broadcastTables:
- t_config
defaultTableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
shardingAlgorithms:
hash_mod:
type: HASH_MOD
props:
sharding-count: '3'
keyGenerators:
increment:
type: SNOWFLAKE
props:
worker-id: 1
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-739668677
Closed because of no response.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #8217: proxy excute insert sql but insert into all physical table
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-731917970
1. What is your ShardingSphere version?
2. Can you provide log of `sql.show`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org