-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
lock: add delay clean table lock when session close #11038
Conversation
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #11038 +/- ##
================================================
- Coverage 81.0145% 80.9561% -0.0585%
================================================
Files 419 419
Lines 89732 89336 -396
================================================
- Hits 72696 72323 -373
- Misses 11773 11778 +5
+ Partials 5263 5235 -28 |
/run-all-tests |
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
config/config.toml.example
Outdated
@@ -57,6 +57,9 @@ treat-old-version-utf8-as-utf8mb4 = true | |||
# enable-table-lock is used to control table lock feature. Default is false, indicate the table lock feature is disabled. | |||
enable-table-lock = false | |||
|
|||
# delay-clean-table-lock is used to control delay release table lock when the abnormal situation. (Milliseconds) |
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.
is used to control delay release table lock when the abnormal situation.
-> is used to control whether delayed-release the table lock in the abnormal situation.
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
/run-all-tests |
What problem does this PR solve?
Add
delay-clean-table-lock
configuration to control delay clean table lock.It is used for
TiSpark
.Before This PR:
The logic of
TiSpark
to use the table lock is:The problem is, What if the session was closed by unexpected between step 3 and 4, It will cause some problem.
TiFlash need to delayed release table lock before do commit.
What is changed and how it works?
Add
sleep
insession.Close
ifdelay-clean-table-lock
has been configed.Check List
Tests
Code changes
Side effects
Related changes