-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
planner: add new variables for instance plan cache #55193
Conversation
Hi @qw4990. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #55193 +/- ##
================================================
- Coverage 74.8430% 74.0323% -0.8107%
================================================
Files 1568 1569 +1
Lines 364503 441473 +76970
================================================
+ Hits 272805 326833 +54028
- Misses 71976 94292 +22316
- Partials 19722 20348 +626
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/approve |
pkg/sessionctx/variable/sysvar.go
Outdated
return strconv.FormatInt(InstancePlanCacheTargetMemSize.Load(), 10), nil | ||
}, | ||
SetGlobal: func(_ context.Context, s *SessionVars, val string) error { | ||
v, err := strconv.ParseInt(val, 10, 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to consider using TidbOptInt64
? I see that many variables are directly set to the default value when the error occurs, and I wonder whether these two variables are considered to be treated the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: easonn7, time-and-fate, zimulala The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #54057
Problem Summary: planner: add new variables for instance plan cache
What changed and how does it work?
Add three new variables for the instance level plan cache:
tidb_enable_instance_plan_cache
: whether to enable this feature;tidb_instance_plan_cache_target_mem_size
: the target memory limit (or soft mem limit) of the cache;tidb_instance_plan_cache_max_mem_size
: the max memory limit (or hard mem limit) of the cache;Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.