ddl: add index run out of tikv disk
- 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)

Start the cluster with TiKV config `reserve-space = "0MB"`, then run add index with dxf and global sort, if TiKV's disk has no enough space, the index data will run out of the disk and make the TiKV down.
After #50998 closed, TiDB side will not check the free space, and just be awared of TiKV's new error `DiskSpaceNotEnough`, but if we don't set the`reserve_space`, the disk state will never be updated and always be normal. So, there 's no disk space check actually.
### 2. What did you expect to see? (Required)
Add index failed with no space left warning or some message but TiKV still alive.
### 3. What did you see instead (Required)
TiKV down.
### 4. What is your TiDB version? (Required)
v8.1.2
Contributor guide
Assessment
This issue has not been assessed yet.