-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Enhancement
In some cases, we need to force the optimizer to refresh the binding cache to load all the latest bindings. For example, after setting a new binding cache size, or adding a batch of new bindings.
Now we only support instance-level "admin reload bindings", which means we have to connect to every TiDB node in this cluster and execute this statement, which is not convenient.
And what makes the problem worse is that in some environments, there is a proxy in front of TiDB instances, which means we can't connect to each TiDB manually. And we even have to rolling-restart all TiDB instances.
We'd better support a cluster-level "admin reload bindings" to improve the usability.
Below is a concrete example.
There are more than 10 TiDB instances in this cluster, and because the original binding cache size is too small, these TiDB instances need to evict some bindings from their caches, then they might cache different numbers of bindings in memory.
To solve this, we need to first set global tidb_mem_quota_binding_cache = ... to increase the binding cache size, then second connect to each TiDB and run admin reload bindings.
The second step is not convenient since we need to connect to each TiDB manually.
