pingcap / pingcap/tidb

Load infoschema operation in domain takes a long time

Open
#45,385 0 comments 0 reactions 0 assignees View on GitHub
sig/sql-infra type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
Currently, when the load schema operation is executed on a cluster with hundreds of thousands of tables, the time and memory consumption are large. In particular, taking a long time can lead to some problems: https://github.com/pingcap/tidb/issues/45176

I tested the scenario myself:
```
Benchbot cluster, 1 TiDB, 3 TiKV, upgrade from v6.5.2 to v7.2.0
Make the first reload take 54s(create 500,000 tables ) in domain.Init for v7.2.0 branch.
```

At present, in addition to TiDB startup, the system information will be fully loaded, most of the other cases are incremental load table structure. But the problem still exists.

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.