pingcap / pingcap/tidb

Resource cannot be well limited in large transactions

Open
#65,554 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
For large transactions (e.g. DELETE ... affecting ~40k rows), TiDB splits the SQL into hundreds or thousands of KV requests and dispatches them concurrently (default prewrite concurrency is 128). These batch requests can instantly saturate TiKV resources (coprocessor, scheduler CPU), creating traffic spikes that consume large goroutines and lock resources, delaying or blocking other transactions. Timeouts and retries further amplify the spikes, leading to lock conflict storms and high overhead from failed transactions.

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.