-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 docs for sysvar cache #6464
Conversation
/label requires-followup |
/cc @xhebox I can't read it :-) |
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.
Rest LGTM
system-variables.md
Outdated
@@ -25,8 +25,8 @@ SET GLOBAL tidb_distsql_scan_concurrency = 10; | |||
|
|||
> **注意:** | |||
> | |||
> - 在 TiDB 中,`GLOBAL` 变量的设置即使重启后也仍然有效。每隔 2 秒,其他 TiDB server 会获取到对变量设置的更改。详情见 [TiDB #14531](https://github.com/pingcap/tidb/issues/14531)。 | |||
> - 此外,由于应用和连接器通常需要读 MySQL 变量,为了兼容这一需求,在 TiDB 中,部分 MySQL 5.7 的变量既可读取也可设置。例如,尽管 JDBC 连接器不依赖于查询缓存 (query cache) 的行为,但仍然可以读取和设置查询缓存。 | |||
> - 当语句发出后,`SET GLOBAL` 会在 TiDB 服务器上立即执行。之后,通知会发送到所有 TiDB 服务器上以刷新其系统变量缓存,该操作会在后台立即开始。由于某些 TiDB 服务器可能会错过通知,系统变量缓存每 30 秒会自动刷新一次。这有助于确保所有服务器都以相同的配置运行。 |
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.
当语句发出后,
SET GLOBAL
会在 TiDB 服务器上立即执行。之后,通知会发送到所有 TiDB 服务器上以刷新其系统变量缓存
意思对了, 但是不太自然, 也许类似
SET GLOBAL
语句在执行它的 TiDB 服务器上会立刻起效. 之后会通知所有TiDB 服务器...
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.
请问第一句改成这样可以如何?Thx!
在 TiDB 服务器上执行
SET GLOBAL
语句后,该更改会立即生效。之后会通知所有 TiDB 服务器刷新其系统变量缓存……
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
@xhebox: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. 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. |
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
[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. |
/remove-status LGT1 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e689949
|
What is changed, added or deleted? (Required)
This is the docs for pingcap/tidb#24359 which has not merged yet. It more accurately reflects the future-state of sysvars.
There is another PR for GA releases which describes how it previously worked better: #5562
It needs a "followup" to insert the version the change is effective from.
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?