-
Notifications
You must be signed in to change notification settings - Fork 696
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
docs for instance scoped system variables #7897
docs for instance scoped system variables #7897
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. |
cf1f8ce
to
3b8e8e4
Compare
system-variables.md
Outdated
- Persists to cluster: Yes | ||
- Default value: `ON` |
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.
This is an additional change that was picked up by the script. The default has changed in TiDB 6.0.
LGTM |
Might be good to check after merging if any other PRs have updated this file and make sure any newly added config options also have the right information. Maybe also check for other open PRs for the same file. |
Currently it's easier to catch it on the next auto-generated config PR. This is generated from #5720 - I would like to add it to CI at some point, but we still have 70 sysvars to document first :( |
- Range: `[1, 1073741824]` | ||
- Range: `[1, 3600]` |
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.
This is from pingcap/tidb#33473 - it only affects master / TiDB 6.1.
- Range: `[1, 2147483647]` | ||
- Range: `[0, 2147483647]` |
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.
This is from pingcap/tidb#30664 - it only affects master and not TIDB 6.0.
- Persists to cluster: Yes | ||
- Default value: `OFF` |
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.
The default is wrong. It is OFF not on. See pingcap/tidb#31547 by @ekexium
(It is wrong in 6.0 and master)
### tidb_top_sql_max_meta_count (New in v6.0.0) | ||
|
||
- Scope: GLOBAL | ||
- Default value: `5000` | ||
- Range: `[1, 10000]` | ||
- This variable is used to control the maximum number of SQL statement types collected by [Top SQL](/dashboard/top-sql.md) per minute. | ||
|
||
### tidb_top_sql_max_time_series_count (New in v6.0.0) | ||
|
||
- Scope: GLOBAL | ||
- Default value: `100` | ||
- Range: `[1, 5000]` | ||
- This variable is used to control how many SQL statements that contribute the most to the load (that is, top N) can be recorded by [Top SQL](/dashboard/top-sql.md) per minute. | ||
|
||
> **Note:** | ||
> | ||
> Currently, the Top SQL page in TiDB Dashboard only displays the top 5 types of SQL queries that contribute the most to the load, which is irrelevant with the configuration of `tidb_top_sql_max_time_series_count`. | ||
|
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.
These have just been moved. They were not in alphabetical order :(
- Scope: INSTANCE | ||
- Scope: GLOBAL | ||
- Persists to cluster: No |
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.
The documentation for Instance scope variables changes to "GLOBAL + Persists = No". See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md
- Default value: `0` | ||
- Range: `[-2147483648, 0]` |
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.
This is a bug fix in pingcap/tidb#32763 - it is function neutral.
3c13e2e
to
4b32677
Compare
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
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
@ran-huang Shall we merge this PR now? All contents are applicable to v6.1. |
If you don't merge it, followup PRs will be more complicated because more is picked up by the script. |
@morgo If this PR is reviewed and approved by the code owner(s), we can merge it. I understand that the follow-up PRs will be more complicated, and we hope to merge every PR as soon as we can. I only have one concern: these changes are applicable to v6.1, but since v6.1 has not been released yet, there might be reverts or further changes to the code -- it happened a lot in the past few releases. If that happens, I'm afraid no one will remember to make changes to the docs accordingly. That's the major reason we insist that this PR be merged after code freeze. If we merge this PR before code freeze, we'll need to get back to it and confirm there are no further changes. Can we ask for your help by then? |
Sure that's fine - these changes are generated by a script, so if they are reverted (which is rare) a subsequent script execution will update to the new values. But I have to say that its rare we revert PRs - and a more likely outcome of this process is that it is leading to the system variables docs being out of date. All but 2 changes also apply to 6.0, but because the last PR to update the docs took too long to review ( #7737) we had to delay this to now for documenting (the changes stack on each other, and get complicated to review if we don't merge them). |
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
I agree with it. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 010079c
|
LGTM |
What is changed, added or deleted? (Required)
This adds the documentation changes described earlier in https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md#documentation-changes
In master (and 6.0) we have native support for instance scoped variables, which are now set with "SET GLOBAL" instead of "SET SESSION" (note:
SET INSTANCE
was never a thing.)We don't describe instance scoped variables as "instance scoped" but rather: "Persists to cluster: No". This was intentional because INSTANCE isn't really a thing in MySQL. The property that is most understantable is if it persists to the other nodes in the cluster, and INSTANCE and GLOBAL scope are mutually exclusive.
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
pingcap/tidb#32888
Do your changes match any of the following descriptions?