pingcap / pingcap/tidb

`BatchPointGet` may read inconsistent data compared to `PointGet`.

Open
#71,015 3 comments 0 reactions 1 assignee Claimed by @YangKeao View on GitHub
affects-25.10 affects-26.3 affects-8.1 affects-8.5 component/ddl found-by-ai severity/major sig/sql-infra type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```sql
CREATE TABLE t (a INT PRIMARY KEY, b INT, c INT)
PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (20));
ALTER TABLE t ADD UNIQUE INDEX idx_b (b) GLOBAL;
INSERT INTO t VALUES (1,1,1),(11,11,11);

-- Block at StateDeleteReorganization
SELECT * FROM t WHERE b = 1; -- Point_Get -> Empty
SELECT * FROM t WHERE b IN (1); -- Batch_Point_Get -> Return (1,1,1)(BUG)
SELECT * FROM t WHERE b IN (1,11);-- Batch_Point_Get -> Return (1,1,1) and (11,11,11)
```

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

The result of `BatchPointGet` and `PointGet` are the same.

### 3. What did you see instead (Required)

The results are different.

### 4. What is your TiDB version? (Required)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.