pingcap / pingcap/tidb

make DumpStatsToJSON and LoadStatsFromJSON don't depend on handle

Open
#40,624 0 comments 0 reactions 1 assignee Claimed by @xuyifangreeneyes View on GitHub
sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

BR needs to use DumpStatsToJSON and LoadStatsFromJSON. But we don't want it to use `handle`, which introduces `domain`.

It's dangerous to use `domain` in BR, since a domain represents a tidb. But it's not a real `tidb` in BR, it may miss some bootstrap operations, and cause bugs.

So it's better to make DumpStatsToJSON and LoadStatsFromJSON as normal functions.

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.