huifer opened a new issue, #23389:
URL: https://github.com/apache/shardingsphere/issues/23389

   Anomalies: 
   1. duplicate database ID production 
   3. abnormal query data
   
   
   ### Which version of ShardingSphere did you use?
   org.apache.shardingsphere:sharding-jdbc-spring-boot-starter:4.1.1
   
   ###  Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1.  Please use the code repository I provided  
[github](https://github.com/huifer/sharding-jdbc-test)
   2.  Execute `com.example.demo.rest.AcontrollerTest#gen` method passing in 
parameter 2023,The data is presented in the database as follows
   ```
   818114806320992257   device_1        2023-02-01 00:00:00     6       89      
290     5851    60390
   818114806320992258   device_2        2023-02-01 00:00:00     1       14      
301     0018    21050
   818114806320992259   device_3        2023-02-01 00:00:00     9       77      
919     5078    00798
   ```
   3.   Execute `com.example.demo.rest.AcontrollerTest#gen` method passing in 
parameter 2024,The data is presented in the database as follows
   
   ```
   818114806320992257   device_1        2024-02-01 00:00:00     5       30      
077     9618    52059
   818114806320992258   device_2        2024-02-01 00:00:00     7       85      
481     9165    91450
   818114806320992259   device_3        2024-02-01 00:00:00     6       16      
941     3355    62767
   ```
   **The above operation shows that the ID production results are duplicated**
   
   4.  Execute the `com.example.demo.rest.AcontrollerTest#data` method in this 
case,The returned data results in an exception。The data for 2023 was repeated 2 
times, and the data for 2024 was not successfully queried
   
   - The result of the function execution is shown in the figure
   
![image](https://user-images.githubusercontent.com/26766909/211129522-bd3eca36-ae35-4ffe-b1e2-82909e5787eb.png)
   
   -  The execution log is as follows
   ```
   2023-01-07 11:33:50.291  INFO 10316 --- [    Test worker] ShardingSphere-SQL 
                      : Actual SQL: ds ::: select sampledata0_.id as id1_0_, 
sampledata0_.device_id as device_i2_0_, sampledata0_.time as time3_0_, 
sampledata0_.v1 as v4_0_, sampledata0_.v2 as v5_0_, sampledata0_.v3 as v6_0_, 
sampledata0_.v4 as v7_0_, sampledata0_.v5 as v8_0_ from sample_data_2023_2 
sampledata0_ where sampledata0_.time<? ::: [2077-01-01 00:00:00.0]
   2023-01-07 11:33:50.291  INFO 10316 --- [    Test worker] ShardingSphere-SQL 
                      : Actual SQL: ds ::: select sampledata0_.id as id1_0_, 
sampledata0_.device_id as device_i2_0_, sampledata0_.time as time3_0_, 
sampledata0_.v1 as v4_0_, sampledata0_.v2 as v5_0_, sampledata0_.v3 as v6_0_, 
sampledata0_.v4 as v7_0_, sampledata0_.v5 as v8_0_ from sample_data_2024_2 
sampledata0_ where sampledata0_.time<? ::: [2077-01-01 00:00:00.0]
   ```
   
   
   


-- 
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-unsubscr...@shardingsphere.apache.org.apache.org

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

Reply via email to