Skip to content

Commit 7dbc37b

Browse files
committed
Merge branch 'master' of github.com:qiancai/docs
2 parents 7a411d4 + bfa737f commit 7dbc37b

18 files changed

+570
-46
lines changed

.github/workflows/dispatch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- release-5.0
1919
- release-4.0
2020
- release-3.0
21+
- i18n-zh-release-8.5
2122

2223
jobs:
2324
trigger:

.github/workflows/translation-zh.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: Translation(zh) by AI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
file_names:
7+
description: 'Specify file names to translate (comma-separated list)'
8+
required: false
9+
type: string
10+
default: ''
11+
512

613
env:
714
CN_CLOUD_BRANCH: i18n-zh-release-8.5
@@ -35,7 +42,11 @@ jobs:
3542
export GH_TOKEN=${{github.token}}
3643
cd docs
3744
npm i
38-
node scripts/filterUpdateFiles.js --cloud
45+
if [ -n "${{ inputs.file_names }}" ]; then
46+
node scripts/fetchFiles.js --files "${{ inputs.file_names }}"
47+
else
48+
node scripts/filterUpdateFiles.js --cloud
49+
fi
3950
tree tmp
4051
cd ..
4152
- name: Copy new files to translator folder

.lycheeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ https://centminmod\.com/mydumper\.html
3535
https://docs\.pingcap\.com/tidb/v6\.6/system-variables#tidb_pessimistic_txn_aggressive_locking-new-in-v660
3636
https://docs\.pingcap\.com/tidb/v7\.6/system-variables#tidb_ddl_version-new-in-v760
3737
https://developers\.redhat\.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level
38+
https://.*github.*/%7B%7B%7B%20.tidb_operator_version%20%7D%7D%7D

TOC.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@
436436
- [Use TiDB](/best-practices/tidb-best-practices.md)
437437
- [Manage DDL](/ddl-introduction.md)
438438
- [Optimize Multi-Column Indexes](/best-practices/multi-column-index-best-practices.md)
439+
- [Manage Indexes and Identify Unused Indexes](/best-practices/index-management-best-practices.md)
439440
- [Handle Millions of Tables in SaaS Multi-Tenant Scenarios](/best-practices/saas-best-practices.md)
440441
- [Use UUIDs as Primary Keys](/best-practices/uuid.md)
441442
- [Develop Java Applications](/best-practices/java-app-best-practices.md)
@@ -1084,6 +1085,7 @@
10841085
- [Schedule Replicas by Topology Labels](/schedule-replicas-by-topology-labels.md)
10851086
- [URI Formats of External Storage Services](/external-storage-uri.md)
10861087
- [TiDB Workload Repository](/workload-repository.md)
1088+
- [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/online-workloads-and-add-index-operations.md)
10871089
- FAQs
10881090
- [FAQ Summary](/faq/faq-overview.md)
10891091
- [TiDB FAQs](/faq/tidb-faq.md)

best-practices-for-security-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ To avoid this risk, it is recommended to set a root password during deployment:
2020
- For deployments using TiUP, refer to [Deploy TiDB Cluster Using TiUP](/production-deployment-using-tiup.md#step-7-start-a-tidb-cluster) to generate a random password for the root user.
2121
- For deployments using TiDB Operator, refer to [Set initial account and password](https://docs.pingcap.com/tidb-in-kubernetes/stable/initialize-a-cluster#set-initial-account-and-password) to set the root password.
2222

23+
You can also use the [`--initialize-secure`](/command-line-flags-for-tidb-configuration.md#--initialize-secure) option to restrict network access for the initial root user.
24+
2325
## Enable password complexity checks
2426

2527
By default, TiDB does not enforce password complexity policies, which might lead to the use of weak or empty passwords, increasing security risks.

best-practices/index-management-best-practices.md

Lines changed: 319 additions & 0 deletions
Large diffs are not rendered by default.

command-line-flags-for-tidb-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ When you start the TiDB cluster, you can use command-line options or environment
4949

5050
## `--initialize-secure`
5151

52-
- Bootstraps tidb-server in secure mode
52+
- Controls whether to create a `root` account using the `auth_socket` authentication method during tidb-server initialization. If it is set to `true`, when connecting to TiDB for the first time, you must use a socket connection, which provides stronger security.
5353
- Default: `false`
5454

5555
## `--initialize-sql-file`

config-templates/simple-tiproxy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ global:
66
deploy_dir: "/tidb-deploy"
77
data_dir: "/tidb-data"
88
component_versions:
9-
tiproxy: "v1.2.0"
9+
tiproxy: "v1.3.2"
1010
server_configs:
1111
tidb:
1212
graceful-wait-before-shutdown: 30

dm/dm-compatibility-catalog.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,56 @@
11
---
22
title: Compatibility Catalog of TiDB Data Migration
3-
summary: This document describes the compatibility between DM of different versions and upstream/downstream databases.
3+
summary: This document describes the compatibility of TiDB Data Migration (DM) with upstream and downstream databases.
44
---
55

66
# Compatibility Catalog of TiDB Data Migration
77

88
DM supports migrating data from different sources to TiDB clusters. Based on the data source type, DM has four compatibility levels:
99

10-
- **Generally available (GA)**: The application scenario has been verified and passed the GA test.
11-
- **Experimental**: Although the application scenario has been verified, the test does not cover all scenarios or involves only a limited number of users. The application scenario might encounter problems occasionally.
12-
- **Not tested**: DM is expected to be always compatible with MySQL during iteration. However, due to resource constraints, not all MySQL forks are tested with DM. Therefore, the *not tested* source or target is technically compatible with DM, but is not fully tested, which means you need to verify its compatibility before you use.
13-
- **Incompatible**: DM is proved to be incompatible with the data source and the application is not recommended for use in production environments.
10+
- **Generally available (GA)**: The application scenario has been verified and passed GA testing.
11+
- **Experimental**: Common application scenarios have been verified, but coverage is limited or involves only a small number of users. Occasional issues are possible, so you need to verify compatibility in your specific scenario.
12+
- **Not tested**: DM aims to be compatible with the MySQL protocol and binlog. However, not all MySQL forks or versions are included in the DM test matrix. If a fork or version uses MySQL-compatible protocols and binlog formats, it is expected to work, but you must verify compatibility in your own environment before use.
13+
- **Incompatible**: DM has known blocking issues, so production use is not recommended.
1414

1515
## Data sources
1616

17-
|Data source|Compatibility level|Remarks|
18-
|-|-|-|
19-
|MySQL ≤ 5.5|Not tested||
20-
|MySQL 5.6|GA||
21-
|MySQL 5.7|GA||
22-
|MySQL 8.0|GA|Does not support binlog transaction compression [Transaction_payload_event](https://dev.mysql.com/doc/refman/8.0/en/binary-log-transaction-compression.html)|
23-
|MariaDB < 10.1.2|Incompatible|Incompatible with binlog of the time type|
24-
|MariaDB 10.1.2 ~ 10.5.10|Experimental||
25-
|MariaDB > 10.5.10|Incompatible|Permission errors reported in the check procedure|
17+
| Data source | Compatibility level | Note |
18+
| - | - | - |
19+
| MySQL ≤ 5.5 | Not tested | |
20+
| MySQL 5.6 | GA | |
21+
| MySQL 5.7 | GA | |
22+
| MySQL 8.0 | GA | Does not support binlog transaction compression [Transaction_payload_event](https://dev.mysql.com/doc/refman/8.0/en/binary-log-transaction-compression.html). |
23+
| MariaDB < 10.1.2 | Incompatible | Incompatible with binlog of the time type. |
24+
| MariaDB 10.1.2 ~ 10.5.10 | Experimental | |
25+
| MariaDB > 10.5.10 | Not tested | Expected to work in most cases after bypassing the [precheck](/dm/dm-precheck.md). See [MariaDB notes](#mariadb-notes). |
26+
27+
### Incompatibility with foreign key CASCADE operations
28+
29+
- DM creates foreign key **constraints** on the target, but they are not enforced while applying transactions because DM sets the session variable [`foreign_key_checks=OFF`](/system-variables.md#foreign_key_checks).
30+
- DM does **not** support `ON DELETE CASCADE` or `ON UPDATE CASCADE` behavior by default, and enabling `foreign_key_checks` via a DM task session variable is not recommended. If your workload relies on cascades, **do not assume** that cascade effects will be replicated.
31+
32+
### MariaDB notes
33+
34+
- For MariaDB **10.5.11 and later**, the DM **precheck fails** due to privilege name changes (for example, `BINLOG MONITOR`, `REPLICATION SLAVE ADMIN`, `REPLICATION MASTER ADMIN`). The error appears as `[code=26005] fail to check synchronization configuration` in the replication privilege, dump privilege, and dump connection number checkers.
35+
- You can **bypass the precheck** by adding `ignore-checking-items: ["all"]` in the DM task. See [DM precheck](/dm/dm-precheck.md) for details.
2636

2737
## Target databases
2838

2939
> **Warning:**
3040
>
31-
> DM v5.3.0 is not recommended. If you have enabled GTID replication but do not enable relay log in DM v5.3.0, data replication fails with low probability.
32-
33-
|Target database|Compatibility level|DM version|
34-
|-|-|-|
35-
|TiDB 8.x|GA|≥ 5.3.1|
36-
|TiDB 7.x|GA|≥ 5.3.1|
37-
|TiDB 6.x|GA|≥ 5.3.1|
38-
|TiDB 5.4|GA|≥ 5.3.1|
39-
|TiDB 5.3|GA|≥ 5.3.1|
40-
|TiDB 5.2|GA|≥ 2.0.7, recommended: 5.4|
41-
|TiDB 5.1|GA|≥ 2.0.4, recommended: 5.4|
42-
|TiDB 5.0|GA|≥ 2.0.4, recommended: 5.4|
43-
|TiDB 4.x|GA|≥ 2.0.1, recommended: 2.0.7|
44-
|TiDB 3.x|GA|≥ 2.0.1, recommended: 2.0.7|
45-
|MySQL|Experimental||
46-
|MariaDB|Experimental||
41+
> DM v5.3.0 is not recommended. Enabling GTID replication without relay log in DM v5.3.0 might cause data replication to fail, although the probability is low.
42+
43+
| Target database | Compatibility level | DM version |
44+
| - | - | - |
45+
| TiDB 8.x | GA | ≥ 5.3.1 |
46+
| TiDB 7.x | GA | ≥ 5.3.1 |
47+
| TiDB 6.x | GA | ≥ 5.3.1 |
48+
| TiDB 5.4 | GA | ≥ 5.3.1 |
49+
| TiDB 5.3 | GA | ≥ 5.3.1 |
50+
| TiDB 5.2 | GA | ≥ 2.0.7, recommended: 5.4 |
51+
| TiDB 5.1 | GA | ≥ 2.0.4, recommended: 5.4 |
52+
| TiDB 5.0 | GA | ≥ 2.0.4, recommended: 5.4 |
53+
| TiDB 4.x | GA | ≥ 2.0.1, recommended: 2.0.7 |
54+
| TiDB 3.x | GA | ≥ 2.0.1, recommended: 2.0.7 |
55+
| MySQL | Experimental | |
56+
| MariaDB | Experimental | |

follower-read.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Default: leader
3232

3333
This variable is used to set the expected data read mode.
3434

35-
- When the value of `tidb_replica_read` is set to `leader` or an empty string, TiDB maintains its default behavior and sends all read operations to the leader replica to perform.
36-
- When the value of `tidb_replica_read` is set to `follower`, TiDB selects a follower replica of the Region to perform all read operations.
35+
- When you set the value of `tidb_replica_read` to `leader` or an empty string, TiDB maintains its default behavior and sends all read operations to the leader replica to perform.
36+
- When you set the value of `tidb_replica_read` to `follower`, TiDB selects a follower replica of the Region to perform read operations. If the Region has learner replicas, TiDB also considers them for reads with the same priority. If no available follower or learner replicas exist for the current Region, TiDB reads from the leader replica.
3737
- When the value of `tidb_replica_read` is set to `leader-and-follower`, TiDB can select any replicas to perform read operations. In this mode, read requests are load balanced between the leader and follower.
3838
- When the value of `tidb_replica_read` is set to `prefer-leader`, TiDB prefers to select the leader replica to perform read operations. If the leader replica is obviously slow in processing read operations (such as caused by disk or network performance jitter), TiDB will select other available follower replicas to perform read operations.
3939
- When the value of `tidb_replica_read` is set to `closest-replicas`, TiDB prefers to select a replica in the same availability zone to perform read operations, which can be a leader or a follower. If there is no replica in the same availability zone, TiDB reads from the leader replica.
@@ -42,13 +42,18 @@ This variable is used to set the expected data read mode.
4242
- If the estimated result of a read request is greater than or equal to the value of [`tidb_adaptive_closest_read_threshold`](/system-variables.md#tidb_adaptive_closest_read_threshold-new-in-v630), TiDB prefers to select a replica in the same availability zone for read operations. To avoid unbalanced distribution of read traffic across availability zones, TiDB dynamically detects the distribution of availability zones for all online TiDB and TiKV nodes. In each availability zone, the number of TiDB nodes whose `closest-adaptive` configuration takes effect is limited, which is always the same as the number of TiDB nodes in the availability zone with the fewest TiDB nodes, and the other TiDB nodes automatically read from the leader replica. For example, if TiDB nodes are distributed across 3 availability zones (A, B, and C), where A and B each contains 3 TiDB nodes and C contains only 2 TiDB nodes, the number of TiDB nodes whose `closest-adaptive` configuration takes effect in each availability zone is 2, and the other TiDB node in each of the A and B availability zones automatically selects the leader replica for read operations.
4343
- If the estimated result of a read request is less than the value of [`tidb_adaptive_closest_read_threshold`](/system-variables.md#tidb_adaptive_closest_read_threshold-new-in-v630), TiDB can only select the leader replica for read operations.
4444

45-
- When the value of `tidb_replica_read` is set to `learner`, TiDB reads data from the learner replica. If there is no learner replica in the Region, TiDB returns an error.
45+
- When you set the value of `tidb_replica_read` to `learner`, TiDB reads data from the learner replica. If no learner replica is available for the current Region, TiDB reads from an available leader or follower replica.
4646

4747
<CustomContent platform="tidb">
4848

4949
> **Note:**
5050
>
51-
> When the value of `tidb_replica_read` is set to `closest-replicas` or `closest-adaptive`, you need to configure the cluster to ensure that replicas are distributed across availability zones according to the specified configuration. To configure `location-labels` for PD and set the correct `labels` for TiDB and TiKV, refer to [Schedule replicas by topology labels](/schedule-replicas-by-topology-labels.md). TiDB depends on the `zone` label to match TiKV nodes in the same availability zone, so you need to make sure that the `zone` label is included in the `location-labels` of PD and `zone` is included in the configuration of each TiDB and TiKV node. If your cluster is deployed using TiDB Operator, refer to [High availability of data](https://docs.pingcap.com/tidb-in-kubernetes/v1.4/configure-a-tidb-cluster#high-availability-of-data).
51+
> When you set `tidb_replica_read` to `closest-replicas` or `closest-adaptive`, to ensure that replicas are distributed across availability zones according to the specified configuration, you need to configure `location-labels` for PD and set the correct `labels` for TiDB and TiKV according to [Schedule replicas by topology labels](/schedule-replicas-by-topology-labels.md). TiDB depends on the `zone` label to match TiKV nodes in the same availability zone, so you need to make sure that the `zone` label is included in the `location-labels` of PD and `zone` is included in the configuration of each TiDB and TiKV node. If your cluster is deployed using TiDB Operator, refer to [High availability of data](https://docs.pingcap.com/tidb-in-kubernetes/stable/configure-a-tidb-cluster#high-availability-of-data).
52+
>
53+
> For TiDB v7.5.0 and earlier versions:
54+
>
55+
> - If you set `tidb_replica_read` to `follower` and no follower or learner replicas are available, TiDB returns an error.
56+
> - If you set `tidb_replica_read` to `learner` and no learner replicas are available, TiDB returns an error.
5257
5358
</CustomContent>
5459

0 commit comments

Comments
 (0)