-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
tikv: don't collapse batch resolve locks #17025
tikv: don't collapse batch resolve locks #17025
Conversation
/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
How did you find this bug? @youjiali1995 |
Green GC test always fails after upgrading dependency of it to latest release-4.0. |
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
40757ed
to
ff0d815
Compare
Codecov Report
@@ Coverage Diff @@
## master #17025 +/- ##
================================================
- Coverage 80.0804% 79.9815% -0.0989%
================================================
Files 510 510
Lines 139305 138797 -508
================================================
- Hits 111556 111012 -544
- Misses 18788 18817 +29
- Partials 8961 8968 +7 |
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
/merge |
/run-all-tests |
@youjiali1995 merge failed. |
Does this affect data correctness? If so, it will affect legacy resolvelocks mode too |
Yes. But It is not released in any version. @MyonKeminta |
/run-unit-test |
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com> Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
cherry pick to release-4.0 in PR #17033 |
Signed-off-by: youjiali1995 zlwgx1023@gmail.com
What problem does this PR solve?
Problem Summary:
#16838 collapses the same resolve lock requests. However, it uses
RegionId + StartVersion
as the key:tidb/store/tikv/client_collapse.go
Line 61 in e3e51b4
When doing GC, GC worker calls
BatchResolveLocks
whoseStartVersion
is always 0. It results in unexpected collapses:tidb/store/tikv/lock_resolver.go
Line 241 in e3e51b4
What is changed and how it works?
What's Changed:
Don't collapse batch resolve locks.
Related changes
Check List
Tests
Side effects
Release note