pingcap / pingcap/tidb

infoschema v2: pid2tid btree not GC'd after reorganize partition DDL causes memory retention

Open
#69,687 3 comments 0 reactions 1 assignee Claimed by @djshow832 View on GitHub
affects-8.1 component/ddl may-affects-7.5 may-affects-8.5 report/customer severity/critical 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)

Produce many DDL that involves partition tables.

### 2. What did you expect to see? (Required)
The memory won't be very high, or the memory is still high after restart.

### 3. What did you see instead (Required)
The memory becomes higher and higher, and the memory is low after restart (actually OOM).

Before restart:

Image

[profile-2026-07-03_20-00-00.zip](https://github.com/user-attachments/files/29704728/profile-2026-07-03_20-00-00.zip)

After restart:

Image

[profile-2026-07-04_05-24-00.zip](https://github.com/user-attachments/files/29704740/profile-2026-07-04_05-24-00.zip)

### 4. What is your TiDB version? (Required)

v8.5.4

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.