-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
bugfix: fix the case that could not retry acquire global lock #3133
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3133 +/- ##
==========================================
Coverage 50.46% 50.47%
- Complexity 3111 3112 +1
==========================================
Files 593 593
Lines 19571 19572 +1
Branches 2427 2427
==========================================
+ Hits 9876 9878 +2
+ Misses 8702 8701 -1
Partials 993 993
|
Codecov Report
@@ Coverage Diff @@
## develop #3133 +/- ##
=============================================
+ Coverage 52.15% 52.16% +0.01%
- Complexity 3509 3510 +1
=============================================
Files 638 638
Lines 21109 21110 +1
Branches 2614 2615 +1
=============================================
+ Hits 11009 11012 +3
+ Misses 9014 9012 -2
Partials 1086 1086
|
@caohdgege I think |
这个之前在群里跟清铭哥讨论过,在autocommit=false 的时候,进行释放本地锁有点难,然后重试策略又比较重要,暂时先通过让它不释放本地锁直接重试,后续再优化 |
If we have to do this, should we change the configuration meaning? Otherwise, it is easy to cause misunderstanding. By the way, how about to make use of |
我个人的理解上,如果在 autocommit=false 的时候,如果要释放本地锁然后重试意味着要 重新执行对应的DML以及业务操作 ,用savepoint或者记录到context只能保证重新执行对应的DML,没有执行对应的业务操作。现在没能找到一个方案可以实现重新执行对应的DML以及业务操作,所以才采用了这么一个临时方案。或者云嵩哥有没有什么更好的建议? |
I think biz op is something bigger than things here, the global lock keys are also from dml and db values, we can consider this configuration only in at mode so far. Under this consideration, what about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the retry functionality is fine, but the meaning of the configuration item has changed and may require further consideration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
fix: will not retry acquire lock when LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT is true and autoCommit is false
Ⅱ. Does this pull request fix one issue?
fixes #3070
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews