-
Notifications
You must be signed in to change notification settings - Fork 12.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
using the Nacos2.2.2 and kingbase8 database update config conflit whit DuplicateKeyException #10353
Comments
caused: PreparedStatementCallback;错误: 重复键违反唯一约束"uk_configinfo_datagrouptenant"Detail: 键值
The intent of these statements is: Try { INSERT NEW CONFIGURATION } catch (DKE - this means that the configuration exists, so the same configuration needs to be updated. And we only need to update the existing configuration!). DuplicateKeyException thrown when an attempt to insert or update data results in violation of a primary key or unique constraint. DataIntegrityViolationException thrown when an attempt to insert or update data results in violation of an integrity constraint. There are many scenarios where data constraint exceptions will occur, such as: the field is not empty BTW we can't update an unexist cofnig! |
If there are two "same" configurations in your database, check your |
missing |
@YunWZ I see the commend in
and commend in
|
Well, that's a good suggestion, we should handle all exception cases instead of just `DuplicateKeyException. Of course, in this case we should to do two things:
What do you think? |
…cateKeyException together.
Currently, handling DataIntegrityViolationException and DuplicateKeyException together, but log more inforamtion for |
I am using kingbase8 database and my datasource plugin for nacos 2.2.2,when i update the config ,i occur caused: PreparedStatementCallback;错误: 重复键违反唯一约束"uk_configinfo_datagrouptenant"
The text was updated successfully, but these errors were encountered: