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

In pessimistic transaction, select for update is different on partition tables and non-partition tables #22244

Closed
zhenjiaogao opened this issue Jan 6, 2021 · 3 comments
Labels
duplicate Issues or pull requests already exists. sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@zhenjiaogao
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  • Partiton Table
    image

  • Non-partition Table
    image

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

In pessimistic transaction, select for update is the same on partition and non-partition tables

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

mysql> select version();
+--------------------+
| version()          |
+--------------------+
| 5.7.25-TiDB-v4.0.9 |
+--------------------+
1 row in set (0.00 sec)
@zhenjiaogao zhenjiaogao added the type/bug The issue is confirmed as a bug. label Jan 6, 2021
@zyguan
Copy link
Contributor

zyguan commented Jan 7, 2021

TiDB may acquire unnecessary locks #21688, thus we get lock wait timeout for the case of non-partitioned table. For the partitioned table version, I think it because the query condition doesn't match any of partitions, if we create an partition which include '2020-11-30', it gets blocked too.

@jebter jebter added the sig/transaction SIG:Transaction label Jan 8, 2021
@zyguan
Copy link
Contributor

zyguan commented Dec 27, 2021

dup of #21688

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

@zyguan zyguan added duplicate Issues or pull requests already exists. and removed severity/moderate needs-more-info labels Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues or pull requests already exists. sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants