lock_manager: Skip updating lock wait info for non-fair-locking requests (#17500)#17870
Merged
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom Nov 20, 2024
Merged
Conversation
…sts (tikv#17500) close tikv#17394 lock_manager: Skip updating lock wait info for non-fair-locking requests This is a simpler and lower-risky fix of the OOM issue tikv#17394 for released branches, as an alternative solution to tikv#17451 . In this way, for acquire_pessimistic_lock requests without enabling fair locking, the behavior of update_wait_for will be a noop. So that if fair locking is globally disabled, the behavior will be equivalent to versions before 7.0. Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
cfzjywxk
approved these changes
Nov 20, 2024
ekexium
approved these changes
Nov 20, 2024
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfzjywxk, ekexium The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports #17500 to master.
#17500 was first planned to be used as the fix for versions <= 8.1, however, the complete fix (#17451) was then still considered too risky. So we decided to also use #17500 as the fix for master as well as 8.5 branch, and the complete fix will be left and may be considered in the future.
After this fix, there may be a little more false posotive / false negative cases in the deadlock detection under lock contention scenarios.
What is changed and how it works?
Issue Number: Close #17394
What's Changed:
This is a simple alternative solution to #17451 .
For non-fair locking scenario, it's confirmed that the problem can be avoided.
Before:

After:

Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note