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

txn: the update could not read the latest data if read committed is used. #41581

Closed
cfzjywxk opened this issue Feb 20, 2023 · 2 comments
Closed
Labels

Comments

@cfzjywxk
Copy link
Contributor

cfzjywxk commented Feb 20, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

init
set global tidb_txn_mode = 'pessimistic';
set global tx_isolation = 'READ-COMMITTED';
create table t(a int key, b int);
session 1
begin pessimistic;

session 2
insert into t values(5, 5);

session 1
update t set b = 22 where a = 5;

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

mysql> update t set b = 22 where a = 5;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

3. What did you see instead (Required)

mysql> update t set b = 22 where a = 5;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

The update could not read the latest data, this is possibly a bug introduced during the refactoring of the transaction module in tidb, after #34702 the bug is fixed, but v6.1.x and v6.0.0 are affected.

4. What is your TiDB version? (Required)

tidb v6.0.0 v6.1.x

@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.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 may-affects-6.6 labels Feb 20, 2023
@cfzjywxk cfzjywxk 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.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 may-affects-6.6 labels Feb 20, 2023
@jackysp
Copy link
Member

jackysp commented Feb 20, 2023

I think 07b0c7c introduces this bug.

@cfzjywxk
Copy link
Contributor Author

close by #41590

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

No branches or pull requests

4 participants