TiDB locks the record which is filtered by the non-index condition in point-get plan at RC isolation
- Lingua principale
- Go
- Stelle
- 40.5k
- Fork
- 6.2k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
## Bug Report
Please answer these questions before submitting your issue. Thanks!
RC isolation
### 1. Minimal reproduce step (Required)
create table t1(id1 int, id2 int, id3 int, PRIMARY KEY(id1), UNIQUE KEY udx_id2 (id2));
INSERT INTO t1 VALUES(1,1,1);
-- session1
begin;
select * from t1 where id1 = 1 and id2 = 2 for update;
-- session2
begin
select * from t1 where id1 = 1 for update;
### 2. What did you expect to see? (Required)
session2 returns the result immediately.
### 3. What did you see instead (Required)
session2 was blocked by the lock of the key whose values is ```
### 4. What is your TiDB version? (Required)
Release Version: v6.2.0
Edition: Community
Git Commit Hash: daf2b17cdfe30c02ce282361009fb5bdb05f2b0e
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by running the supplied two-session SQL reproduction at RC isolation on TiDB v6.2.0, then trace the point-get plan's handling of non-index predicates and record locks. Done means session2 returns immediately rather than being blocked by the key lock, with coverage for the reported query behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go
- Ambito
- databases, distributed-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100