Skip to content

Commit

Permalink
Add an example for byte-threshold and region-cpu-overload-threshold-r…
Browse files Browse the repository at this point in the history
…atio adjustment (#10800) (#10806) (#10811)
  • Loading branch information
ti-chi-bot authored Oct 13, 2022
1 parent e457eab commit 20a2247
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion certificate-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ The user certificate information can be specified by `require subject`, `require
{{< copyable "sql" >}}

```sql
create user 'u1'@'%' require san 'DNS:d1,URI:spiffe://example.org/myservice1,URI:spiffe://example.org/myservice2'
create user 'u1'@'%' require san 'DNS:d1,URI:spiffe://example.org/myservice1,URI:spiffe://example.org/myservice2';
```

The above configuration only allows the `u1` user to log in to TiDB using the certificate with the URI item `spiffe://example.org/myservice1` or `spiffe://example.org/myservice2` and the DNS item `d1`.
Expand Down
12 changes: 7 additions & 5 deletions configure-load-base-split.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,20 @@ To modify the parameter, take either of the following two methods:

- Use a SQL statement:

{{< copyable "sql" >}}

```sql
set config tikv split.qps-threshold=3000
# Set the QPS threshold to 1500
SET config tikv split.qps-threshold=1500;
# Set the byte threshold to 15 MiB (15 * 1024 * 1024)
SET config tikv split.byte-threshold=15728640;
```

- Use TiKV:

{{< copyable "shell-regular" >}}

```shell
curl -X POST "http://ip:status_port/config" -H "accept: application/json" -d '{"split.qps-threshold":"3000"}'
curl -X POST "http://ip:status_port/config" -H "accept: application/json" -d '{"split.qps-threshold":"1500"}'
curl -X POST "http://ip:status_port/config" -H "accept: application/json" -d '{"split.byte-threshold":"15728640"}'
```

Accordingly, you can view the configuration by either of the following two methods:
Expand All @@ -57,7 +59,7 @@ Accordingly, you can view the configuration by either of the following two metho
{{< copyable "sql" >}}

```sql
show config where type='tikv' and name like '%split.qps-threshold%'
show config where type='tikv' and name like '%split.qps-threshold%';
```

- Use TiKV:
Expand Down
6 changes: 3 additions & 3 deletions dynamic-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ When using the `set config` statement, you can modify the configuration of a sin
{{< copyable "sql" >}}

```sql
set config tikv `split.qps-threshold`=1000
set config tikv `split.qps-threshold`=1000;
```

- Modify the configuration of a single TiKV instance:

{{< copyable "sql" >}}

```sql
set config "127.0.0.1:20180" `split.qps-threshold`=1000
set config "127.0.0.1:20180" `split.qps-threshold`=1000;
```

If the modification is successful, `Query OK` is returned:
Expand Down Expand Up @@ -220,7 +220,7 @@ You can modify the PD configurations using the following statement:
{{< copyable "sql" >}}
```sql
set config pd `log.level`='info'
set config pd `log.level`='info';
```

If the modification is successful, `Query OK` is returned:
Expand Down
4 changes: 2 additions & 2 deletions sql-statements/sql-statement-recover-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ summary: An overview of the usage of RECOVER TABLE for the TiDB database.
{{< copyable "sql" >}}

```sql
RECOVER TABLE table_name
RECOVER TABLE table_name;
```

{{< copyable "sql" >}}

```sql
RECOVER TABLE BY JOB ddl_job_id
RECOVER TABLE BY JOB ddl_job_id;
```

## Synopsis
Expand Down
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-show-engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This statement is used to list all supported storage engines. The syntax is incl
![ShowEnginesStmt](/media/sqlgram/ShowEnginesStmt.png)

```sql
SHOW ENGINES
SHOW ENGINES;
```

## Examples
Expand Down
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-show-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The `SHOW PROFILES` statement currently only returns an empty result.
{{< copyable "sql" >}}

```sql
SHOW PROFILES
SHOW PROFILES;
```

```
Expand Down

0 comments on commit 20a2247

Please sign in to comment.