-
Notifications
You must be signed in to change notification settings - Fork 8.8k
已经关闭的问题又出现了:Duplicate entry for key 'lock_table.PRIMARY' #6822
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
Comments
确定是相同的xid? |
由于为了解决insert场景没必要的锁重入问题,应该从1.5开始就改为了insert sql时忽略校验锁重入。什么样的业务场景需要先删除后插入呢? |
这是个用户和角色的关联表,里面只有两个主键,在编辑用户时,直接先删除该用户的角色,再重新插入,相比于判断哪些角色需要删除哪些需要插入,写起来更方便点.至于为什么这么写,那就是历史遗留问题了. |
有没有可能将这俩动作合并到一个本地事务去? |
合并到本地事务是指在更新用户和关联角色的方法上加个
|
需要帮忙提供以下信息, Please provide the following information.
|
server和client都是1.7.0.
|
另外rollback拼错了 |
我确认是这个问题导致的catch失效了,你可以提个pr帮忙修复这个问题吗? |
额, 流程是什么?直接fork分支2.x,修改代码后提交合并请求到2.x? |
是的,尽快跟进下review的留言,这样在2.2上可以合并进去 |
Uh oh!
There was an error while loading. Please reload this page.
#4872
我使用的是2.0.0的版本, 但出现了一样的问题, 先删后增报错, 尝试关闭lock_table的主键, 会发现两条row_key相同,branch_id不同的数据
user_role表就两个字段: user_id, role_id
删除sql: delete from user_role where user_id = 1
插入sql: insert into user_role (user_id, role_id) values (1, 2)
The text was updated successfully, but these errors were encountered: