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 the missing unlock in extractKeyExistsErr #603

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

sticnarf
Copy link
Collaborator

@sticnarf sticnarf commented Oct 12, 2022

In #585, I forgot to unlock in all branches in extractKeyExistsErr. So, if it goes into !c.txn.us.HasPresumeKeyNotExists(err.GetKey()) branch, the lock is never released.

Actually, it's unlikely to reach that branch because Op_Insert is only generated when there is a PresumeKeyNotExists flag. The only exception I find is amending transaction. It directly generates Op_Insert entries.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@cfzjywxk cfzjywxk merged commit 6def8d7 into tikv:master Oct 12, 2022
guo-shaoge pushed a commit to guo-shaoge/client-go that referenced this pull request Oct 13, 2022
Signed-off-by: Yilin Chen <sticnarf@gmail.com>

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: guo-shaoge <shaoge1994@163.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