-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.apache.shardingsphere:sharding-jdbc-spring-boot-starter:4.1.1 generator id error and query error #23389
Comments
If possible I would like to get your help to tell the specific reasons for this phenomenon, thank you very much! |
My current guess is that I am using the following code when producing the database tables
caused the ID to self-increment, but in sharding I configured the snowflake algorithm and I think he should override my ID self-increment |
If you remove this add will fail with the following exceptions log
|
Hi @huifer Thanks for the feedback, starting from version |
Why you must use 5.3.0, sharding-jdbc-spring-boot-starter Latest Version |
Hi @huifer, 4.1.1 is a historical version and is no longer maintained. Welcome to upgrade to the latest 5.3.1. If you have any problems, please submit new issue feedback. |
org.apache.shardingsphere:shardingsphere-jdbc-core-spring-boot-starter:5.2.1 What version of SpringBoot should be used
error log
|
|
Anomalies:
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.
com.example.demo.rest.AcontrollerTest#gen
method passing in parameter 2023,The data is presented in the database as followscom.example.demo.rest.AcontrollerTest#gen
method passing in parameter 2024,The data is presented in the database as followsThe above operation shows that the ID production results are duplicated
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 queriedThe result of the function execution is shown in the figure
The execution log is as follows
The text was updated successfully, but these errors were encountered: