Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions develop/dev-guide-connection-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@ INSERT INTO `t` (`a`) VALUES (11) ON DUPLICATE KEY UPDATE `a` = 11;
INSERT INTO `t` (`a`) VALUES (12) ON DUPLICATE KEY UPDATE `a` = 12;
```

The above `INSERT` statements cannot be rewritten into one statement. But if you change the three statements into the following ones:
The above `INSERT` statements cannot be rewritten into one statement. But if you change the three statements as follows, they meet the rewrite requirement:

```sql
INSERT INTO `t` (`a`) VALUES (10) ON DUPLICATE KEY UPDATE `a` = VALUES(`a`);
INSERT INTO `t` (`a`) VALUES (11) ON DUPLICATE KEY UPDATE `a` = VALUES(`a`);
INSERT INTO `t` (`a`) VALUES (12) ON DUPLICATE KEY UPDATE `a` = VALUES(`a`);
```

Then they meet the rewrite requirement. The above `INSERT` statements will be rewritten into the following one statement:
The above `INSERT` statements will be rewritten into the following one statement:

```sql
INSERT INTO `t` (`a`) VALUES (10), (11), (12) ON DUPLICATE KEY UPDATE a = VALUES(`a`);
Expand Down
4 changes: 2 additions & 2 deletions develop/java-app-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ insert into t (a) values (11) on duplicate key update a = 11;
insert into t (a) values (12) on duplicate key update a = 12;
```

The above `INSERT` statements cannot be rewritten into one statement. But if you change the three statements into the following ones:
The above `INSERT` statements cannot be rewritten into one statement. But if you change the three statements as follows, they meet the rewrite requirement:

```sql
insert into t (a) values (10) on duplicate key update a = values(a);
insert into t (a) values (11) on duplicate key update a = values(a);
insert into t (a) values (12) on duplicate key update a = values(a);
```

Then they meet the rewrite requirement. The above `INSERT` statements will be rewritten into the following one statement:
The above `INSERT` statements will be rewritten into the following one statement:

```sql
insert into t (a) values (10), (11), (12) on duplicate key update a = values(a);
Expand Down
4 changes: 2 additions & 2 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,7 @@ Assume that you have a cluster with 4 TiDB nodes and multiple TiKV nodes. In thi
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No
- Default value: `ON`
- Type: Boolean
- This variable is a switch for [the resource control feature](/tidb-resource-control-ru-groups.md). When this variable is set to `ON`, the TiDB cluster can isolate application resources based on resource groups.
- This variable controls whether to enable [the resource control feature](/tidb-resource-control-ru-groups.md). When this variable is set to `ON`, the TiDB cluster can isolate application resources based on resource groups.

### tidb_enable_reuse_chunk <span class="version-mark">New in v6.4.0</span>

Expand Down Expand Up @@ -4592,7 +4592,7 @@ mysql> desc select count(distinct a) from test.t;
- Default value: `0`
- Range: `[0, 2147483647]`
- This variable is used to control the selection of the TiDB Join Reorder algorithm. When the number of nodes participating in Join Reorder is greater than this threshold, TiDB selects the greedy algorithm, and when it is less than this threshold, TiDB selects the dynamic programming algorithm.
- Currently, for OLTP queries, it is recommended to keep the default value. For OLAP queries, it is recommended to set the variable value to 10~15 to get better connection orders in OLAP scenarios.
- Currently, for OLTP queries, it is recommended to keep the default value. For OLAP queries, it is recommended to set the variable value to 10~15 to get better join orders in OLAP scenarios.

### tidb_opt_join_reorder_through_sel <span class="version-mark">New in v8.5.6</span>

Expand Down
2 changes: 1 addition & 1 deletion tidb-cloud/csv-config-for-import-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The following is the CSV Configuration window when you use the Import Data servi

`{"key1": "val1", "key2": "val2"}`

If the content of the CSV source file is saved as JSON in the following way, then consider setting `Backslash escape = True` as follows. But this is not the standard format for CSV.
If a JSON field in the CSV source file is stored in the following way, consider setting `Backslash escape = True`. Note that this is not the standard format for CSV.

`"{\"key1\": \"val1\", \"key2\":\"val2\" }"`

Expand Down
4 changes: 2 additions & 2 deletions tidb-scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* Replicas of all Regions.
* If the number of replicas is not enough for some Regions, PD needs to complete them.
* If the number of replicas is more than expected (for example, the failed store re-joins into the cluster after recovery), PD needs to delete them.
* Read/Write operations are performed on leaders, which cannot be distributed only on a few individual stores;
* Read/Write operations are performed on leaders, so leaders cannot be concentrated on only a few individual stores;
* Not all Regions are hot, so loads of all TiKV stores need to be balanced;
* When Regions are in balancing, data transferring utilizes much network/disk traffic and CPU time, which can influence online services.
* When Regions are being balanced, data transferring utilizes much network/disk traffic and CPU time, which can influence online services.

Check warning on line 28 in tidb-scheduling.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [PingCAP.Ambiguous] Consider using a clearer word than 'much' because it may cause confusion. Raw Output: {"message":"[PingCAP.Ambiguous] Consider using a clearer word than 'much' because it may cause confusion.","location":{"path":"tidb-scheduling.md","range":{"start":{"line":28,"column":63},"end":{"line":28,"column":67}}},"severity":"INFO","code":{"value":"PingCAP.Ambiguous"}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Maintainability & Code Quality · Quick win

Use precise resource terms in the scheduling warning.

The phrase “much network/disk traffic and CPU time” is ambiguous. Replace it with a direct description of the consumed resources.

Committable suggestion
- When Regions are being balanced, data transferring utilizes much network/disk traffic and CPU time, which can influence online services.
+ When Regions are being balanced, data transfer consumes significant network bandwidth, disk I/O, and CPU time, which can affect online services.
Tools
GitHub Check: vale

[warning] 28-28:
[vale] reported by reviewdog 🐶
[PingCAP.Ambiguous] Consider using a clearer word than 'much' because it may cause confusion.

Raw Output:
{"message":"[PingCAP.Ambiguous] Consider using a clearer word than 'much' because it may cause confusion.","location":{"path":"tidb-scheduling.md","range":{"start":{"line":28,"column":63},"end":{"line":28,"column":67}}},"severity":"INFO","code":{"value":"PingCAP.Ambiguous"}}

Sources: Path instructions, Linters/SAST tools


These situations can occur at the same time, which makes it harder to resolve. Also, the whole system is changing dynamically, so a scheduler is needed to collect all information about the cluster, and then adjust the cluster. So, PD is introduced into the TiDB cluster.

Expand Down
Loading