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/12/17 09:55:17 UTC

[GitHub] [shardingsphere] Roronoa-Zoro opened a new issue #8671: shardingjdbc does not work with AbstractRoutingDataSource

Roronoa-Zoro opened a new issue #8671:
URL: https://github.com/apache/shardingsphere/issues/8671


   ## 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!
   Background:
   jdk:1.8
   springboot:2.1.8
   
   in our one project, we have two datasource, one is normal, the other is sharding datasource.
   we encapsulate an class,named MixDataSourceProperties,and in our auto configuration class,we parse this MixDataSourceProperties,when type is 'normal', we use DruidDataSourceFactory to create an normal datasource object, when type is 'sharding', we read a yaml file,see below
   
   ======
   dataSources:
     ds:  !!com.alibaba.druid.pool.DruidDataSource
       password: Welcome
       url: jdbc:mysql://xxxx:3306/common?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&useAffectedRows=true&useSSL=false
       username: hello
   props:
     sql:
       show: true
   shardingRule:
     tables:
       t_short_url:
         actualDataNodes: ds.t_short_url_$->{0..31}
         logicTable: t_short_url
         tableStrategy:
           standard:
             preciseAlgorithmClassName: com.xxx.ShortUrlTableShardingAlgorithm
             shardingColumn: short_url
   
   ======
   when I use ShortUrlDao to insert one record, actual sql is same with logic sql,
   and I try to debug the sharding logic, ShardingConnection is get, and ShardingPreparedStatement is also invoked,
   but actual sql is not changed.
   
   Please help to figure it out. Thanks.
    
   ### Which version of ShardingSphere did you use?
   4.0.1
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC 
   ### Expected behavior
   
   ### 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Roronoa-Zoro commented on issue #8671: shardingjdbc does not work with AbstractRoutingDataSource

Posted by GitBox <gi...@apache.org>.
Roronoa-Zoro commented on issue #8671:
URL: https://github.com/apache/shardingsphere/issues/8671#issuecomment-747824522


   it's an mistake, I set sql.show to see detail log, actual sql is changed.


----------------------------------------------------------------
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] menghaoranss commented on issue #8671: shardingjdbc does not work with AbstractRoutingDataSource

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #8671:
URL: https://github.com/apache/shardingsphere/issues/8671#issuecomment-747395632


   Please provide some logs for  the logic and actual sql, and if possible, you can try with 4.1.1 or the latest version.


----------------------------------------------------------------
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] Roronoa-Zoro closed issue #8671: shardingjdbc does not work with AbstractRoutingDataSource

Posted by GitBox <gi...@apache.org>.
Roronoa-Zoro closed issue #8671:
URL: https://github.com/apache/shardingsphere/issues/8671


   


----------------------------------------------------------------
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