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/21 10:03:16 UTC

[GitHub] [shardingsphere] wangyu3619 commented on issue #21683: query error

wangyu3619 commented on issue #21683:
URL: https://github.com/apache/shardingsphere/issues/21683#issuecomment-1286737462

   i debug the code ,find that the ShardingSphereDataSource data source does not contain all my sharding tables infomation.
   ![image](https://user-images.githubusercontent.com/19728206/197167907-31a17373-8caa-4ec8-b322-4c68e321e32d.png)
   **this is my configs:**
   
   `spring.shardingsphere.datasource.master.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.master.driver-class-name=org.mariadb.jdbc.Driver
   spring.shardingsphere.datasource.master.jdbc-url=jdbc:mysql://127.0.0.1:3306/test-new-oms?useSSL=false&useServerPrepStmts=false&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8
   spring.shardingsphere.datasource.master.username=root
   spring.shardingsphere.datasource.master.password=root
   spring.shardingsphere.datasource.master.binding-tables=node_stat_info,stat_center_info
   
   spring.shardingsphere.rules.sharding.tables.node_stat_info.actual-data-nodes=master.node_stat_info_$->{2022..2030}$->{['01','02','03','04','05','06','07','08','09','10','11','12']}$->{['01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31']}
   spring.shardingsphere.rules.sharding.tables.center_stat_info.actual-data-nodes=master.stat_center_info_$->{2022..2030}$->{['01','02','03','04','05','06','07','08','09','10','11','12']}$->{['01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31']}
   
   spring.shardingsphere.rules.sharding.tables.node_stat_info.table-strategy.standard.sharding-column=sampling_time
   spring.shardingsphere.rules.sharding.tables.node_stat_info.table-strategy.standard.sharding-algorithm-name=sharding-by-day
   spring.shardingsphere.rules.sharding.tables.center_stat_info.table-strategy.standard.sharding-column=sampling_time
   spring.shardingsphere.rules.sharding.tables.center_stat_info.table-strategy.standard.sharding-algorithm-name=sharding-by-day
   
   spring.shardingsphere.rules.sharding.sharding-algorithms.sharding-by-day.type=CLASS_BASED
   spring.shardingsphere.rules.sharding.sharding-algorithms.sharding-by-day.props.strategy=standard
   spring.shardingsphere.rules.sharding.sharding-algorithms.sharding-by-day.props.algorithmClassName=com.config.ShardingByDayTime`
   
   i configed two rules ,but i can find only one shardingTable`s infomations in the ShardingSphereSchema.
   
   I crete a table every day.
   ![image](https://user-images.githubusercontent.com/19728206/197170238-df4fe0c1-9b74-48aa-a037-b708733a2a90.png)
   
   
   


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