-
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
txn: update table delta map when really lock keys #21996
txn: update table delta map when really lock keys #21996
Conversation
@cfzjywxk PTAL |
@you06 @MyonKeminta PTAL |
@cfzjywxk Shall we cherry-pick it to master? |
executor/executor_test.go
Outdated
tk1.MustExec("commit") | ||
} | ||
|
||
func (s *testSuite) TestIssue20975SelectForUpdateBatchPointGet(c *C) { |
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.
We need to add some cases for pointGetExec
and batchPointGetExec
- Isolation is default RR(SI).
- Using non-handle unique keys.
- The correspond handle keys do not exist.
These unique keys should be locked and thus these lock only transactions will get schema check during 2pc.
@cfzjywxk PTAL |
The schema check will be skipped here because the ddl lease is 0s. tidb/domain/schema_validator.go Lines 224 to 226 in e3b62d8
|
Is this has some problem? For tidb server the lease time should be 45s in configuration file. So seems this check always fails. |
I think the problem comes here tidb/executor/executor_test.go Line 165 in e3b62d8
|
Maybe we could move the test cases to |
Good idea. |
Why those test case set lease to zero? |
No idea why changing default lease value, it does pollutes the test environment. |
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
LGTM |
@you06 PTAL need another LGTM |
LGTM |
/merge |
/run-all-tests |
@cfzjywxk shall we cherry-pick it to master? |
What problem does this PR solve?
Issue Number: close #20975
Problem Summary:
What is changed and how it works?
What's Changed:
Update missing table ID to table delta map when there has key locked. And skip SchemaChecker when table delta map is empty.
Related changes
Check List
Tests
Side effects
Release note