pingcap / pingcap/tidb

Expose config options as instance scoped sysvars

Open
#34,960 0 comments 1 reaction 1 assignee Claimed by @CbcWestwolf View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

This is a sibling to https://github.com/pingcap/tidb/issues/33769

It is suggested that the following config options be converted to the corresponding instance scoped sysvars. This is "Stage 2" of the [instance scope proposal](https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md).

However, since this proposal was authored it was decided that we will "default to global", and thus many variables will instead be converted to global scoped sysvars and not instance scoped. Those on this list have a strong use case for instance scope (refer to the resources of the local machine).

| Config Name | Sysvar Name | Notes | PR |
---- | ----- | ----- | -----
token-limit | tidb_connection_concurrency_limit | Discussed with PM: This should be instance scope since it refers to the resources of an individual server. Forked to https://github.com/pingcap/tidb/issues/34583 | https://github.com/pingcap/tidb/pull/34662 |
| tmp-storage-path | tidb_tmp_storage_path | Should be forked to instance scope (refers to local path). Needs to be available as a sysvar to be consistent with tidb_mem_oom_action and tidb_mem_usage_alarm_ratio | |
| tmp-storage-quota | tidb_tmp_storage_quota | Should be forked to instance scope (refers to local path). Needs to be available as a sysvar to be consistent with tidb_mem_oom_action and tidb_mem_usage_alarm_ratio | |
| run-ddl | tidb_enable_ddl ? | It makes a lot of sense that you might want to disable DDL from running on a node without restarting it. It should be instance scoped. The name needs discussion. All other "tidb_enable_XXX" are global scoped. | |
| max-server-connections | max_connections | There is a mysql variable which handles this use case fine. We should use it. |

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.