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

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
…nges

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
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

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
@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 <MyonKeminta@users.noreply.github.com>

* Fix tests

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix insert test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Avoid primary re-selecting in TestAggressiveLockingLoadValueOptionChanges

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Address comments

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
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