-
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
*: add tidb_min_paging_size system variable #36107
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/dbf7220f09a4a251b69c74d4ac7d8fac269df10d |
Please review #36147 before this one. |
@@ -1673,6 +1674,10 @@ var defaultSysVars = []*SysVar{ | |||
metrics.ToggleSimplifiedMode(TiDBOptOn(s)) | |||
return nil | |||
}}, | |||
{Scope: ScopeGlobal | ScopeSession, Name: TiDBMinPagingSize, Value: strconv.Itoa(DefMinPagingSize), Type: TypeUnsigned, MinValue: 1, MaxValue: paging.MaxPagingSize, SetSession: func(s *SessionVars, val string) error { |
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.
If it is only for testing, is it necessary to be a global variable?
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.
I'm not sure, but I see some other variable use global | session, such as tidb_init_chunk_size, tidb_max_chunk_size
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.
If you can not come up with a scenario of set global
, then no. TiDBInitChunkSize
is historical.
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.
In the benchbot, we can test with this:
python3 main.py gen-benchbot-case --email "[email protected]" --token 'tcmsp_XXX' --testbed_size "2xl" \
--bench_type sysbench --bench_sub_types "select_random_ranges" \
--duration=30m --threads 100 \
--arch amd64 \
--versions nightly \
--tidb_urls "http://fileserver.pingcap.net/download/builds/pingcap/tidb-check/pr/80b30c51fb509e267d1fca9ed5122b70ded1a172/centos7/tidb-server.tar.gz" \
--testbed_size "2xl" \
--tidb_configs "{prepared-plan-cache: {enabled: true}}" \
--tidb_globals "set global tidb_enable_paging = 1; set global tidb_min_paging_size = 128;" \
--tidb_globals "set global tidb_enable_paging = 1; set global tidb_min_paging_size = 256;" \
--tidb_globals "set global tidb_enable_paging = 1; set global tidb_min_paging_size = 512;" \
--tidb_globals "set global tidb_enable_paging = 0;"
--tidb_globals requires global variables @xhebox
/merge |
This pull request has been accepted and is ready to merge. Commit hash: caff4d7
|
/run-mysql-test |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
* master: (27 commits) executor: parallel cancel mpp query (pingcap#36161) store/copr: adjust the cop cache admission process time for paging (pingcap#36157) log-backup: get can restored global-checkpoint-ts when support v3 checkpoint advance (pingcap#36197) executor: optimize cursor read point get by reading through pessimistic lock cache (pingcap#36149) *: add tidb_min_paging_size system variable (pingcap#36107) planner: handle the expected row count for pushed-down selection in mpp (pingcap#36195) *: support show ddl jobs for sub-jobs (pingcap#36168) table-filter: optimize table pattern message and unit tests (pingcap#36160) domain: fix unstable test TestAbnormalSessionPool (pingcap#36154) executor: check the error returned by `handleNoDelay` (pingcap#36105) log-backup: fix checkpoint display (pingcap#36166) store/mockstore/unistore: fix several issues of coprocessor paging in unistore (pingcap#36147) test: refactor restart test (pingcap#36174) ddl: support rename index and columns for multi-schema change (pingcap#36148) test: remove meaningless test and update bazel (pingcap#36136) planner: Reduce verbosity of logging unknown system variables (pingcap#36013) metrics/grafana: bring back the plan cache miss panel (pingcap#36081) ddl: implement table granularity DDL for SchemaTracker (pingcap#36077) *: bazel use jdk 17 (pingcap#36070) telemetry: add reviewer rule (pingcap#36084) ...
What problem does this PR solve?
Issue Number: close #36106
Problem Summary:
Add a @@tidb_min_paging_size system variable so we can test and turning it.
This variable is not intend to be exposed for the user.
It's just for our internal testing.
What is changed and how it works?
Add a variable, so we can change MinPagingSize dynamically.
This facility makes our testing and turning process easier, we'll do some expirements to find the best default value.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.