-
Notifications
You must be signed in to change notification settings - Fork 681
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
system-variables: update from generated source #7737
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. |
### placement_checks <span class="version-mark">New in v5.3.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Default value: `ON` | ||
- This variable controls whether DDL statements validate [Placement Rules in SQL](/placement-rules-in-sql.md). | ||
- It is intended to be used by logical dump/restore tools to ensure that tables can always be created even if placement rules are violated. This is similar to how mysqldump writes `SET FOREIGN_KEY_CHECKS=0;` to the start of every dump file. | ||
|
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 variable has been removed in TiDB 5.4. A new variable tidb_placement_mode exists instead (I will document it separately).
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.
Is this change will be in 5.4.1? i checked in 5.4.0, 'placement_checks' still exist, and no 'tidb_placement_mode' in system variable list.
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.
Here is the PR: pingcap/tidb#31093
It looks like it was created before 5.4 code freeze, but merged after. So my understanding was not correct - it is a 6.0 only change.
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL |
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 behavior change is intentional and only affects master. See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md
### tidb_enable_alter_placement | ||
|
||
> **Warning:** | ||
> | ||
> Currently, Placement Rules in SQL is an experimental feature. It is not recommended that you use it in production environments. | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable enables or disables [Placement Rules in SQL](/placement-rules-in-sql.md). | ||
|
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 experimental flag, but the feature is being declared stable in master.
@@ -779,6 +758,10 @@ Constraint checking is always performed in place for pessimistic transactions (d | |||
> | |||
> - Since v5.4.0, for a newly deployed TiDB cluster, this variable is enabled by default. | |||
|
|||
- Scope: SESSION | GLOBAL | |||
- Default value: `ON` | |||
- This variable is used to control whether to enable the index merge feature. |
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 just moves the comment above the feature specification, to be consistent. We generate it this way in every other case.
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL |
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 behavior change is intentional and only affects master. See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md
### tidb_enable_top_sql <span class="version-mark">New in v5.4.0</span> | ||
|
||
> **Warning:** | ||
> | ||
> Currently, Top SQL is an experimental feature. It is not recommended that you use it for production environments. | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable is used to control whether to enable the [Top SQL](/dashboard/top-sql.md) feature. | ||
|
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 was previously at the bottom of the page (non alphabetical order). Chronological order doesn't make sense to users, so the order is fixed.
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 value of tidb_enable_top_sql is "ON" in v6.0.0
- Default value: `0` | ||
- Default value: "" |
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.
According the the source, the default is "". But it might be a bug: pingcap/tidb#32763
In either case, it's correct right now - but it should be changed in future to be numeric. This will also help improve the docs as the type is shown.
### tidb_stats_load_pseudo_timeout <span class="version-mark">New in v5.4.0</span> | ||
|
||
> **WARNING:** | ||
> **Warning:** |
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 two variables were in the wrong alphabetical order. Warning is also in upper case (inconsistent).
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `24` | ||
- Range: `[0, 255]` | ||
- This variable is used to set the history capacity of [statement summary tables](/statement-summary-tables.md). | ||
|
||
### tidb_stmt_summary_internal_query <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable is used to control whether to include the SQL information of TiDB in [statement summary tables](/statement-summary-tables.md). | ||
|
||
### tidb_stmt_summary_max_sql_length <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `4096` | ||
- Range: `[0, 2147483647]` | ||
- This variable is used to control the length of the SQL string in [statement summary tables](/statement-summary-tables.md). | ||
|
||
### tidb_stmt_summary_max_stmt_count <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `3000` | ||
- Range: `[1, 32767]` | ||
- This variable is used to set the maximum number of statements that [statement summary tables](/statement-summary-tables.md) store in memory. | ||
|
||
### tidb_stmt_summary_refresh_interval <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL |
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 behavior change is intentional and only affects master. See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md
### `tidb_enable_top_sql` <span class="version-mark">New in v5.4.0</span> | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable is used to control whether to enable the [Top SQL](/dashboard/top-sql.md) feature. | ||
|
||
> **Warning:** | ||
> | ||
> Currently, Top SQL is an experimental feature. It is not recommended that you use it for production environments. | ||
|
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 was moved higher up in the document (correct alphabetical order).
- Default value: `lower, md5, reverse, upper, vitess_hash` | ||
- Default value: `lower, md5, reverse, tidb_shard, upper, vitess_hash` |
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 according to the generated source. The default has changed.
I think there will be other updates. It looks like a lot of new sysvars were added which are not documented yet:
So it would be good to merge this first if that's possible :-) |
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 and thank you for the helpful comments!
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
/merge |
@bb7133: In response to this:
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 ti-community-infra/tichi repository. |
/merge |
@morgo: In response to this:
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 ti-community-infra/tichi repository. |
- This variable controls how TiDB behaves when the waiting time of SQL optimization reaches the timeout to synchronously load complete column statistics. The default value `OFF` means that SQL execution fails after the timeout. If you set this variable to `ON`, the SQL optimization gets back to using pseudo statistics after the timeout. | ||
- Scope: SESSION | GLOBAL | ||
- Default value: `0` | ||
- 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.
Does the value range changed? from [0, 4294967295]` changed to [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.
It's not specifically changed, it was always wrong. See: pingcap/tidb#30026 where it was introduced.
math.MaxInt32 == 32 bit signed integer (max = 2147483647).
/merge |
@morgo: In response to this:
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 ti-community-infra/tichi repository. |
/remove-status LGT1 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9f240cb
|
What is changed, added or deleted? (Required)
This updates the system-variables docs, as generated by linking against the tidb source code. There are a lot of small edits, I will explain each in-line.
This only affects tidb-master safely. There might be some smaller updates which need to be cherry picked to 5.4.
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)?
Do your changes match any of the following descriptions?