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 2021/07/02 05:59:47 UTC
[GitHub] [shardingsphere] Yule-Momoko opened a new issue #11106: Why not use my hint routing strategy for federated queries?
Yule-Momoko opened a new issue #11106:
URL: https://github.com/apache/shardingsphere/issues/11106
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
5.0.0-beta
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
#My configuration:
spring.shardingsphere.datasource.names=ds1,ds2
spring.shardingsphere.datasource.common.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.common.driver-class-name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.ds1.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds1.driver‐class‐name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.ds1.url=jdbc:mysql://127.0.0.1:3306/MY_DB1?serverTimezone=Asia/Shanghai&autoReconnect=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true&allowMultiQueries=true
spring.shardingsphere.datasource.ds1.username=admin
spring.shardingsphere.datasource.ds1.password=123456
spring.shardingsphere.datasource.ds2.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds2.driver‐class‐name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.ds2.url=jdbc:mysql://127.0.0.1:3306/MY_DB2?serverTimezone=Asia/Shanghai&autoReconnect=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true&allowMultiQueries=true
spring.shardingsphere.datasource.ds2.username=admin
spring.shardingsphere.datasource.ds2.password=123456
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds$->{1..2}.t_order
spring.shardingsphere.rules.sharding.tables.t_item.actual-data-nodes=ds$->{1..2}.t_item
spring.shardingsphere.rules.sharding.tables.t_order.database-strategy.hint.sharding-algorithm-name=hint-test
spring.shardingsphere.rules.sharding.tables.t_item.database-strategy.hint.sharding-algorithm-name=hint-test
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.type=CLASS_BASED
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.props.strategy=HINT
spring.shardingsphere.rules.sharding.sharding-algorithms.hint-test.props.algorithmClassName=com.my.shardingjdbc.DatabaseHintShardingKeyAlgorithm
spring.shardingsphere.props.sql-show = true
#My Sql:
select * from t_order t1 left join t_item t2 on t1.id=t2.id
### Actual behavior

### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
--
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] strongduanmu edited a comment on issue #11106: Why not use my hint routing strategy for federated queries?
Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #11106:
URL: https://github.com/apache/shardingsphere/issues/11106#issuecomment-872928336
@Yule-Momoko Because the `t_order` table and the `t_item` table are not binding tables, in this scenario, multiple sharding tables cannot be routed normally. If these two tables have the same routing rules, please set them as binding tables.
--
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] RaigorJiang commented on issue #11106: Why not use my hint routing strategy for federated queries?
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #11106:
URL: https://github.com/apache/shardingsphere/issues/11106#issuecomment-924736161
Since this issue has been inactive for more than 30 days, we will close it.
If you still have related questions, please submit a new issue, thank you.
--
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] RaigorJiang closed issue #11106: Why not use my hint routing strategy for federated queries?
Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #11106:
URL: https://github.com/apache/shardingsphere/issues/11106
--
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] strongduanmu commented on issue #11106: Why not use my hint routing strategy for federated queries?
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #11106:
URL: https://github.com/apache/shardingsphere/issues/11106#issuecomment-872928336
@Yule-Momoko Because the `t_order` table and the `t_item` table are not binding tables, in this scenario, multiple sharding tables cannot be routed normally.
--
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] Yule-Momoko commented on issue #11106: Why not use my hint routing strategy for federated queries?
Posted by GitBox <gi...@apache.org>.
Yule-Momoko commented on issue #11106:
URL: https://github.com/apache/shardingsphere/issues/11106#issuecomment-873709198
ok thank you!
--
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