pingcap / pingcap/tidb

Data Error Set to Null After Concurrent Transaction and DDL Execution

Open
#60,245 4 comments 0 reactions 1 assignee Claimed by @CbcWestwolf View on GitHub
affects-8.5 component/ddl impact/inconsistency may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 severity/major 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)

deploy tidb:

```
tiup playground v8.5.1 --host 0.0.0.0
```

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

After all workloads:

```sql
mysql> admin check table table1;
-- ok
```

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

After all workloads:

```sql
mysql> admin check table table1;
ERROR 8223 (HY000): data inconsistency in table: table1, index: table1index_commAttr0, handle: 16, index-values:"handle: 16, values: [KindMysqlDecimal 54.00]" != record-values:"handle: 16, values: [KindNull ]"
```
```sql
mysql> select * from table1 order by pkId;
+------+---------+---------------+---------------+---------------+---------------+---------------+
| pkId | pkAttr0 | commonAttr0_0 | commonAttr1_0 | commonAttr2_0 | commonAttr3_0 | commonAttr4_0 |
+------+---------+---------------+---------------+---------------+---------------+---------------+
| 0 | 5 | 5.00 | 5.00 | 21 | 17 | 5 |
| 1 | 11 | 24.00 | 24.00 | 24 | 24 | 24 |
| 2 | 19 | 33.00 | 45.00 | 45 | 45 | 87 |
| 3 | 29 | 10.00 | 10.00 | 10 | 10 | 10 |
| 4 | 37 | 5.00 | 62.00 | 17 | 17 | 24 |
| 5 | 42 | 24.00 | 51.00 | 24 | 24 | 24 |
| 6 | 50 | 13.00 | 13.00 | 67 | 13 | 13 |
| 7 | 62 | 0.00 | 2.00 | 74 | 10 | 10 |
| 8 | 70 | 99.00 | 4.00 | 17 | 62 | 45 |
| 9 | 79 | 74.00 | 51.00 | 51 | 13 | 32 |
| 10 | 81 | 47.00 | 15.00 | 10 | 46 | 46 |
| 11 | 89 | 45.00 | 45.00 | 17 | 87 | 15 |
| 12 | 103 | 28.00 | 28.00 | 28 | 28 | 28 |
| 13 | 111 | 54.00 | 54.00 | 33 | 74 | 87 |
| 14 | 113 | 49.00 | 49.00 | 49 | 49 | 49 |
| 15 | 121 | NULL | 54.00 | 54 | 62 | 21 |
| 16 | 135 | 47.00 | 47.00 | 47 | 47 | 47 |
| 17 | 137 | 13.00 | 79.00 | 79 | 79 | 87 |
| 18 | 145 | 98.00 | 98.00 | 98 | 98 | 98 |
| 19 | 153 | 54.00 | 54.00 | 54 | 54 | 54 |
| 20 | 167 | 70.00 | 70.00 | 70 | 70 | 70 |
| 21 | 168 | 5.00 | 5.00 | 5 | 5 | 5 |
| 22 | 176 | 46.00 | 46.00 | 46 | 46 | 46 |
| 23 | 191 | 99.00 | 99.00 | 99 | 99 | 99 |
| 24 | 192 | 67.00 | 67.00 | 67 | 67 | 67 |
| 25 | 206 | 24.00 | 24.00 | 24 | 24 | 24 |
| 26 | 214 | 34.00 | 34.00 | 34 | 34 | 34 |
| 27 | 218 | 49.00 | 49.00 | 49 | 49 | 49 |
| 28 | 226 | 86.00 | 86.00 | 86 | 40 | 86 |
| 29 | 239 | 63.00 | 63.00 | 63 | 63 | 63 |
+------+---------+---------------+---------------+---------------+---------------+---------------+
30 rows in set (0.00 sec)
```

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

TiDB v8.5.1

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.