Skip to content
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

Fix incorrect insertion behavior in aggressive locking mode and add tests #651

Merged
merged 6 commits into from
Jan 4, 2023

Conversation

MyonKeminta
Copy link
Contributor

@MyonKeminta MyonKeminta commented Dec 29, 2022

This PR fixes a bug that when inserting on a key that's locked during the previous aggressive locking stage, it may not check the key's existence correctly. Also added more test cases to cover more cornercases of aggressive locking.

Ref: tikv/tikv#13298

Copy link
Contributor

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

integration_tests/2pc_test.go Outdated Show resolved Hide resolved
Signed-off-by: MyonKeminta <[email protected]>
@MyonKeminta
Copy link
Contributor Author

@sticnarf @ekexium PTAL when you have time, thank you!

Copy link
Collaborator

@sticnarf sticnarf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cfzjywxk cfzjywxk merged commit 0f633e4 into tikv:master Jan 4, 2023
@MyonKeminta MyonKeminta deleted the m/aggressivelocking-fix-and-test branch January 4, 2023 07:24
hawkingrei pushed a commit to hawkingrei/client-go that referenced this pull request Feb 24, 2023
…ests (tikv#651)

* Add more tests and fix the bug of insert in aggressive locking

Signed-off-by: MyonKeminta <[email protected]>

* Fix tests

Signed-off-by: MyonKeminta <[email protected]>

* Fix insert test

Signed-off-by: MyonKeminta <[email protected]>

* Avoid primary re-selecting in TestAggressiveLockingLoadValueOptionChanges

Signed-off-by: MyonKeminta <[email protected]>

* Address comments

Signed-off-by: MyonKeminta <[email protected]>

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants