Skip to content

Commit

Permalink
v6.2: add a few sysvars (#9731)
Browse files Browse the repository at this point in the history
* v6.2: add a few sysvars

* add tidb_enable_analyze_snapshot and tidb_enable_concurrent_ddl

* Update system-variables.md

* Apply suggestions from code review

* Update system-variables.md

* Update system-variables.md

* Update dynamic-config.md

* Apply suggestions from code review

Co-authored-by: Aolin <aolin.zhang@pingcap.com>

Co-authored-by: Aolin <aolin.zhang@pingcap.com>
  • Loading branch information
TomShawn and Oreoxmt committed Aug 5, 2022
1 parent 93c7c3a commit d3bfb02
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions dynamic-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ The following TiKV configuration items can be modified online:
| `server.grpc-memory-pool-quota` | Limits the memory size that can be used by gRPC |
| `server.max-grpc-send-msg-len` | Sets the maximum length of a gRPC message that can be sent |
| `server.raft-msg-max-batch-size` | Sets the maximum number of Raft messages that are contained in a single gRPC message |
| `server.simplify-metrics` | Controls whether to simplify the sampling monitoring metrics |
| `storage.block-cache.capacity` | The size of shared block cache (supported since v4.0.3) |
| `storage.scheduler-worker-pool-size` | The number of threads in the Scheduler thread pool |
| `backup.num-threads` | The number of backup threads (supported since v4.0.3) |
Expand Down
24 changes: 24 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,19 @@ Constraint checking is always performed in place for pessimistic transactions (d
>
> Currently, this feature is incompatible with TiDB Binlog in some scenarios and might cause semantic changes on a transaction. For more usage precautions of this feature, refer to [Incompatibility issues about transaction semantic](https://github.com/pingcap/tidb/issues/21069) and [Incompatibility issues about TiDB Binlog](https://github.com/pingcap/tidb/issues/20996).
### tidb_enable_analyze_snapshot <span class="version-mark">New in v6.2.0</span>

- Scope: SESSION | GLOBAL
- Persists to cluster: Yes
- Type: Boolean
- Default value: `OFF`
- This variable controls whether to read historical data or the latest data when performing `ANALYZE`. If this variable is set to `ON`, `ANALYZE` reads the historical data available at the time of `ANALYZE`. If this variable is set to `OFF`, `ANALYZE` reads the latest data.
- Before v5.2, `ANALYZE` reads the latest data. From v5.2 to v6.1, `ANALYZE` reads the historical data available at the time of `ANALYZE`.

> **Warning:**
>
> If `ANALYZE` reads the historical data available at the time of `ANALYZE`, the long duration of `AUTO ANALYZE` might cause the `GC life time is shorter than transaction duration` error because the historical data is garbage-collected.
### tidb_enable_async_commit <span class="version-mark">New in v5.0</span>

- Scope: SESSION | GLOBAL
Expand Down Expand Up @@ -904,6 +917,17 @@ Constraint checking is always performed in place for pessimistic transactions (d
- Default value: `OFF`
- This variable controls whether to enable TiDB to collect `PREDICATE COLUMNS`. After enabling the collection, if you disable it, the information of previously collected `PREDICATE COLUMNS` is cleared. For details, see [Collect statistics on some columns](/statistics.md#collect-statistics-on-some-columns).

### tidb_enable_concurrent_ddl <span class="version-mark">New in v6.2.0</span>

> **Warning:**
>
> **DO NOT modify this variable**. The risk of disabling this variable is unknown and might corrupt the metadata of the cluster.
- Scope: GLOBAL
- Persists to cluster: Yes
- Default value: `ON`
- This variable controls whether to allow TiDB to use concurrent DDL statements. When concurrent DDL statements are used, the DDL execution flow is changed, and DDL statements are not easily blocked by other DDL statements. In addition, multiple indexes can be added at the same time.

### tidb_enable_enhanced_security

- Scope: NONE
Expand Down
5 changes: 5 additions & 0 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ This document only describes the parameters that are not included in command-lin
+ Specifies the queue size of the Raft messages in TiKV. If too many messages not sent in time result in a full buffer, or messages discarded, you can specify a greater value to improve system stability.
+ Default value: `8192`

### `simplify-metrics` <span class="version-mark">New in v6.2.0</span>

+ Specifies whether to simplify the returned monitoring metrics. After you set the value to `true`, TiKV reduces the amount of data returned for each request by filtering out some metrics.
+ Default value: `false`

## readpool.unified

Configuration items related to the single thread pool serving read requests. This thread pool supersedes the original storage thread pool and coprocessor thread pool since the 4.0 version.
Expand Down

0 comments on commit d3bfb02

Please sign in to comment.