pingcap / pingcap/tidb

Don't need to copy the obj from stats cache each time if we set `force-init-stats` to true

Open
#52,344 0 comments 0 reactions 0 assignees View on GitHub
component/statistics sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
![image](https://github.com/pingcap/tidb/assets/7846227/eb3741c3-3ce8-4e40-a995-daebefa0d779)

If we set `force-init-stats` to true, the stats initialization is a blocker of TiDB's bootstrap. So we don't need to worry about the concurrent read&write of the stats cache.

We can avoid the usage of Copy.

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.