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
optimize: pass the sqlexception to client when get lock #4946
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4946 +/- ##
=============================================
+ Coverage 48.70% 49.19% +0.48%
- Complexity 4078 4113 +35
=============================================
Files 736 736
Lines 25818 25820 +2
Branches 3184 3184
=============================================
+ Hits 12575 12701 +126
+ Misses 11907 11773 -134
- Partials 1336 1346 +10
|
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
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
doAcquireLocks实现里把SQLException都吞掉了,估计是因为认为出现这种异常都是因为唯一键冲突,所以默认为这个是锁冲突。当其他异常发生时,他也把异常吞掉就不合适了。
这个pr只在catch到唯一键时返回false,其余情况直接throw。
分析锁冲突和其他异常在TC端和client端的表现
TM
client
Ⅱ. Does this pull request fix one issue?
fixes #4941
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews