planner: trigger a cluster level binding cache refresh after updating binding cache size
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
If the binding cache size is too small, TiDB can't load all bindings into memory, and some queries could encounter a binding cache miss problem.
But after increasing the binding cache through `set global tidb_mem_quota_binding_cache = ?`, TiDB won't refresh the binding cache automatically, which means these missing bindings are still missing in the cache.
Usually, we advise users to run `admin reload bindings` manually to load all missing bindings into the cache after increasing the binding cache. But this seems inconvenient and risky since some users might forget this step.
Below is a concrete example, where the user increased their binding cache size, but forgot to refresh the cache. Then later, when queries come, many queries encountered the binding missing problem and caused soem performance problems.
Contributor guide
Assessment
This issue has not been assessed yet.