planner: use the wrong memory-usage value when evicting plan-cache #34613
Labels
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
affects-6.0
epic/plan-cache
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
The optimizer has a memory protection strategy that if the server's memory usage is higher than a specified proportion(90% by default) the optimizer can evict the LRU plan-cache.
But when calculating the proportion, the optimizer uses a wrong formula
system-mem-usage / max-tidb-mem
instead oftidb-mem-usage / max-tidb-mem
.2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: