pingcap / pingcap/tidb

ddl: add index run out of tikv disk

Open
#60,005 1 comment 0 reactions 1 assignee Claimed by @tangenta View on GitHub
component/ddl severity/moderate 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)

![Image](https://github.com/user-attachments/assets/c929bfec-65cc-4c63-9ad9-c3bec1c69539)
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.
Image

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.

Image

### 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

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.