Skip to content

Fix the missing unlock in extractKeyExistsErr (tidb-6.1)#604

Merged
cfzjywxk merged 1 commit into
tikv:tidb-6.1from
sticnarf:6.1.2-picks
Oct 12, 2022
Merged

Fix the missing unlock in extractKeyExistsErr (tidb-6.1)#604
cfzjywxk merged 1 commit into
tikv:tidb-6.1from
sticnarf:6.1.2-picks

Conversation

@sticnarf
Copy link
Copy Markdown
Collaborator

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>
@sticnarf sticnarf requested a review from cfzjywxk October 12, 2022 07:46
@cfzjywxk cfzjywxk merged commit 624e0ed into tikv:tidb-6.1 Oct 12, 2022
sticnarf added a commit to sticnarf/tidb that referenced this pull request Oct 12, 2022
Signed-off-by: Yilin Chen <sticnarf@gmail.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.

2 participants