Skip to content

planner: use the wrong memory-usage value when evicting plan-cache #34613

@qw4990

Description

@qw4990

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 of tidb-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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions