Describe how the drop table performs the compact operation

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 描述一下drop table 是如何compact操作的

| username: TiDB_C罗

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed that led to the issue
[Encountered Issue: Problem Phenomenon and Impact]
Deleted two large tables, saw the following PD monitoring graph, how is “empty” generated, or how does “compact” handle drop table operations

| username: Kongdom | Original post link

You can refer to this.

| username: dba远航 | Original post link

You can watch the 302 or 301 videos, they cover it, but not in detail.

| username: tidb菜鸟一只 | Original post link

The basic steps are: the DDL process first marks the table as deleted, deletes the metadata, then puts all the keys corresponding to the table into the mysql.gc_delete_range table. The GC worker then performs the actual deletion of the corresponding keys. After that, when the region merge threshold specified by your parameters is reached, the compact process starts to merge the corresponding empty regions or small regions to release space.

| username: 随缘天空 | Original post link

The response is still quite fair.