When parallel apply and apply cache are enabled, the memory may exceed `tidb_mem_quota_apply_cache`
Open
sig/execution
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
https://github.com/pingcap/tidb/blob/095227d4ef77f15ef4e29f0e4b9782175c884f54/pkg/executor/internal/applycache/apply_cache.go#L86-L94
If there are concurrent puts, the append kv may exceed the memory limit.
Contributor guide
Research direction
Start in pkg/executor/internal/applycache/apply_cache.go at lines 86-94 and inspect how concurrent puts append key-values when parallel apply and the apply cache are enabled. Reproduce the concurrent case and verify that append memory remains within tidb_mem_quota_apply_cache.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100