DDL reorg workers send read requests that contain suffix `0x01`
- 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
set global tidb_ddl_enable_fast_reorg = off;
set global tidb_enable_dist_task = off;
create table t (a int);
insert into t values (1);
alter table t add index idx(a);
```
### 2. What did you expect to see? (Required)
https://github.com/pingcap/tidb/blob/c1576410ac18755b2abb4faed51015199a82e671/pkg/ddl/backfilling.go#L1140
The `upperbound` should be `t\x80\x00\x00\x00\x00\x00\x00t_r\x80\x00\x00\x00\x00\x00\x00\x01\x00` (the suffix is `0x00`).
### 3. What did you see instead (Required)
`t\x80\x00\x00\x00\x00\x00\x00t_r\x80\x00\x00\x00\x00\x00\x00\x01\x01` (the suffix is `0x01`).
### 4. What is your TiDB version? (Required)
c1576410ac
Contributor guide
Research direction
Start with pkg/ddl/backfilling.go around line 1140 and reproduce the issue using the SQL steps in the report, with fast reorg and distributed tasks disabled. Trace how the DDL reorg worker constructs the upperbound read request. Done means the generated upperbound ends with suffix 0x00 rather than 0x01.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100