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

GET_LOCK() does not take the possibility of losing pessimistic locks into consideration #38706

Closed
ekexium opened this issue Oct 28, 2022 · 1 comment · Fixed by #38790
Closed
Assignees

Comments

@ekexium
Copy link
Contributor

ekexium commented Oct 28, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

session 1 get_lock().
Wait for 10 minutes. (The inner pessimistic lock somehow gets lost.)
session 2 tries to get_lock() with the same name and can succeed.
Now both session 1 and 2 behave as they hold the same lock.

2. What did you expect to see? (Required)

At most 1 session can hold the lock.

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

6.1.1

@ekexium ekexium added the type/bug The issue is confirmed as a bug. label Oct 28, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 labels Oct 31, 2022
@tangenta tangenta added affects-6.2 affects-6.3 and removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.2 may-affects-6.3 labels Nov 1, 2022
@ekexium
Copy link
Contributor Author

ekexium commented Nov 4, 2022

NOTE: it has not been completely fixed. We just fixed the most frequent reason: GC ignoring internal sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants