Skip to content

Commit

Permalink
Merge pull request #1606 from yikeke/remove-extra-space-at-the-end-of…
Browse files Browse the repository at this point in the history
…-a-line

*: fix markdownlint issues in all docs
  • Loading branch information
yikeke authored Jul 11, 2019
2 parents cfa7889 + 0dcda05 commit 42f1fc0
Show file tree
Hide file tree
Showing 310 changed files with 1,624 additions and 1,736 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
command: |
sudo npm install -g markdownlint-cli
markdownlint --version
- run:
name: "Lint dev"
command: markdownlint dev/
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ about: Any suggestion? Want to add something new?

## Feature Request


**This repository is ONLY used to solve problems related to DOCS-CN.
For other issues (TiDB, TiKV, etc), please move to [other repositories](https://github.com/pingcap/).**
<!-- 本仓库仅用于解决与中文文档相关的问题,
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ about: Usage question that isn't answered in docs or discussion
## Question

**This repository is ONLY used to solve problems related to DOCS-CN.
For other issues (TiDB, TiKV, etc), please move to [other repositories](https://github.com/pingcap/).**
For other issues (TiDB, TiKV, etc), please move to [other repositories](https://github.com/pingcap/).**
<!-- 本仓库仅用于解决与中文文档相关的问题,
其他方面问题(如 TiDB、TiKV 等),请移步其他[相关仓库](https://github.com/pingcap/)。 -->

Expand All @@ -19,6 +19,6 @@ Before asking a question, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/pingcap/docs-cn/issues?utf8=%E2%9C%93&q=is%3Aissue).
<!-- - 查阅了相关的 issues。 -->
- Read the documentation:
- [TiDB Docs](https://github.com/pingcap/docs)
- [TiDB Docs-cn](https://github.com/pingcap/docs-cn)
<!-- - 阅读了相关文档。 -->
- [TiDB Doc](https://github.com/pingcap/docs)
- [TiDB Doc-cn](https://github.com/pingcap/docs-cn)
2 changes: 1 addition & 1 deletion .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ no-missing-space-atx: true
no-multiple-space-atx: true
blanks-around-headings: true
heading-start-left: true
no-duplicate-heading:
no-duplicate-heading:
siblings_only: true
single-title:
front_matter_title: ''
Expand Down
2 changes: 1 addition & 1 deletion dev/benchmark/sysbench-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IDC 机器:
| OS | Linux (CentOS 7.3.1611) |
| CPU | 40 vCPUs, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz |
| RAM | 128GB |
| DISK | Optane 500GB SSD \* 1 |
| DISK | Optane 500GB SSD \* 1 |

Sysbench 版本:1.1.0

Expand Down
8 changes: 4 additions & 4 deletions dev/benchmark/sysbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CREATE TABLE `sbtest` (
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB
) ENGINE=InnoDB
```

部署方案以及配置参数
Expand All @@ -59,7 +59,7 @@ CREATE TABLE `sbtest` (
172.16.20.4 4*tikv 1*tidb 1*sysbench
172.16.20.6 4*tikv 1*tidb 1*sysbench
172.16.20.7 4*tikv 1*tidb 1*sysbench
172.16.10.8 1*tidb 1*pd 1*sysbench
172.16.10.8 1*tidb 1*pd 1*sysbench
// 每个物理节点有三块盘:
data3: 2 tikv (Optane SSD)
Expand Down Expand Up @@ -89,8 +89,8 @@ Mysql version: 5.6.37
thread_cache_size = 64
innodb_buffer_pool_size = 64G
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 0
datadir = /data3/mysql
innodb_flush_log_at_trx_commit = 0
datadir = /data3/mysql
max_connections = 2000
```

Expand Down
2 changes: 1 addition & 1 deletion dev/benchmark/tpcc.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IDC 机器:
| OS | Linux (CentOS 7.3.1611) |
| CPU | 40 vCPUs, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz |
| RAM | 128GB |
| DISK | 1.5TB SSD \* 2 |
| DISK | 1.5TB SSD \* 2 |

本文使用开源的 BenchmarkSQL 5.0 作为 TPC-C 测试工具并添加对 MySQL 协议支持, 可以通过以下命令下载测试程序:

Expand Down
8 changes: 4 additions & 4 deletions dev/how-to/deploy/tidb-binlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ category: reference
参照上文配置完 `inventory.ini` 文件后,从以下两种方式中选择一种进行部署。

**方式一**:在已有的 TiDB 集群上增加 Pump 组件,需按以下步骤逐步进行。

1. 部署 pump_servers 和 node_exporters

```
ansible-playbook deploy.yml -l ${pump1_ip},${pump2_ip},[${alias1_name},${alias2_name}]
```
Expand Down Expand Up @@ -336,7 +336,7 @@ Drainer="192.168.0.13"
```bash
./bin/pump -config pump.toml
```

如果命令行参数与配置文件中的参数重合,则使用命令行设置的参数的值。

2. 使用 binary 部署 Drainer
Expand Down Expand Up @@ -474,7 +474,7 @@ Drainer="192.168.0.13"
# topic-name = ""
```

- 启动示例
- 启动示例

> **注意:**
>
Expand Down
2 changes: 1 addition & 1 deletion dev/how-to/get-started/deploy-tidb-from-kubernetes-dind.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ demo-tikv-2 1/1 Running 0 1m
mkdir -p /home/tidb/demo && \
helm inspect values pingcap/tidb-cluster --version=${chartVersion} > /home/tidb/demo/values-demo.yaml
```
2. 编辑 `/home/tidb/demo/values-demo.yaml`
例如,要扩容集群,可以将 TiKV `replicas` 从 3 修改为 5,或者将 TiDB `replicas` 从 2 修改为 3。
Expand Down
2 changes: 1 addition & 1 deletion dev/how-to/maintain/tidb-binlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Usage of binlogctl:
```

- 修改 Pump/Drainer 的状态

设置 `cmd``update-pump` 或者 `update-drainer` 来更新 Pump 或者 Drainer 的状态。Pump 和 Drainer 的状态可以为:online,pausing,paused,closing 以及 offline。例如:

{{< copyable "shell-regular" >}}
Expand Down
2 changes: 1 addition & 1 deletion dev/how-to/scale/with-ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ TiDB 集群可以在不影响线上服务的情况下进行扩容和缩容。以

例如,如果要添加一个 PD 节点(node103),IP 地址为 172.16.10.103,可以进行如下操作:

1. 编辑 `inventory.ini` 文件,添加节点信息置于 `[pd_servers]` 主机组最后一行:
1. 编辑 `inventory.ini` 文件,添加节点信息置于 `[pd_servers]` 主机组最后一行:

```ini
[tidb_servers]
Expand Down
4 changes: 2 additions & 2 deletions dev/how-to/secure/generate-self-signed-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cfssl print-defaults csr > ca-csr.json

### 配置 CA 选项

根据实际需求修改 `ca-config.json`
根据实际需求修改 `ca-config.json`

```json
{
Expand Down Expand Up @@ -85,7 +85,7 @@ cfssl print-defaults csr > ca-csr.json
}
```

根据实际需求修改 `ca-csr.json`
根据实际需求修改 `ca-csr.json`

```json
{
Expand Down
2 changes: 1 addition & 1 deletion dev/how-to/upgrade/from-previous-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ $ ansible-playbook local_prepare.yml
>
> 为优化 TiDB 集群组件的运维管理,TiDB 3.0 版本对 `systemd` 模式下的 `PD service` 名称进行了调整。与之前版本相比,滚动升级 TiDB 3.0 版本集群组件的操作略有不同,注意升级前后 `process_supervision` 参数配置须保持一致。
如果 `process_supervision` 变量使用默认的 `systemd` 参数,则通过 `excessive_rolling_update.yml` 滚动升级 TiDB 集群。
如果 `process_supervision` 变量使用默认的 `systemd` 参数,则通过 `excessive_rolling_update.yml` 滚动升级 TiDB 集群。

```
$ ansible-playbook excessive_rolling_update.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CREATE TABLE t (i int);
CREATE TABLE test.t (i int);
```

对于 `.` 左右两端可以出现空格,`table_name.col_name` 等于 `table_name . col_name`
对于 `.` 左右两端可以出现空格,`table_name.col_name` 等于 `table_name . col_name`

如果你要引用这个 identifier,那么请使用:

Expand Down
2 changes: 1 addition & 1 deletion dev/reference/sql/statements/split-region.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ create table t (a int, b int,index idx1(a)) shard_row_id_bits = 4 pre_split_regi
4 个 table Region 的范围区间如下:

```
region1: [ -inf , 1<<61 )
region1: [ -inf , 1<<61 )
region2: [ 1<<61 , 2<<61 )
region3: [ 2<<61 , 3<<61 )
region4: [ 3<<61 , +inf )
Expand Down
2 changes: 1 addition & 1 deletion dev/reference/tispark.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ TiSpark 可以使用 TiDB 的统计信息:

统计信息将在 Spark Driver 进行缓存,请确定 Driver 内存足够缓存统计信息。
可以在`spark-defaults.conf`中开启或关闭统计信息读取:

| Property Name | Default | Description
| -------- | -----: | :----: |
| spark.tispark.statistics.auto_load | true | 是否默认进行统计信息读取 |
Expand Down
2 changes: 1 addition & 1 deletion dev/reference/tools/data-migration/cluster-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ DM-master 重启时会自动向每个 DM-worker 实例请求任务信息,重

1. 为中控机设置 SSH 互信以及 sudo 规则。

1. 参考[在中控机上配置 SSH 互信和 sudo 规则](/how-to/deploy/data-migration-with-ansible.md#第-5-步-在中控机上配置-ssh-互信和-sudo-规则),使用 `tidb` 账户登录至中控机,并将 `172.16.10.80` 添加至 `hosts.ini` 文件中的 `[servers]` 部分。
1. 参考[在中控机上配置 SSH 互信和 sudo 规则](/how-to/deploy/data-migration-with-ansible.md#第-5-步-在中控机上配置-ssh-互信和-sudo-规则),使用 `tidb` 账户登录至中控机,并将 `172.16.10.80` 添加至 `hosts.ini` 文件中的 `[servers]` 部分。

```bash
$ cd /home/tidb/dm-ansible
Expand Down
2 changes: 1 addition & 1 deletion dev/reference/tools/data-migration/skip-replace-sqls.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ err:Error 1105: can't drop column c2 with index covered now
args:"ALTER TABLE `shard_db`.`shard_table` DROP INDEX idx_c2;"
args:"ALTER TABLE `shard_db`.`shard_table` DROP COLUMN `c2`"
sqlPattern:"~(?i)ALTER\\s+TABLE\\s+`shard_db`.`shard_table`\\s+DROP\\s+COLUMN\\s+`c2`"
sharding:true
sharding:true
with key ~(?i)ALTER\s+TABLE\s+`shard_db`.`shard_table`\s+DROP\s+COLUMN\s+`c2` matched SQL
USE `shard_db`; ALTER TABLE `shard_db`.`shard_table` DROP COLUMN `c2`;
```
Expand Down
4 changes: 2 additions & 2 deletions dev/reference/tools/loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Loader 包含在 tidb-enterprise-tools 安装包中,可[在此下载](/referen

如果 mydumper 使用 -m 参数,会导出不带表结构的数据,这时 loader 无法导入数据。

如果使用默认的 `checkpoint-schema` 参数,在导完一个 database 数据库后,请 `drop database tidb_loader` 后再开始导入下一个 database。
如果使用默认的 `checkpoint-schema` 参数,在导完一个 database 数据库后,请 `drop database tidb_loader` 后再开始导入下一个 database。

推荐数据库开始导入的时候,明确指定 `checkpoint-schema = "tidb_loader"` 参数。

Expand Down Expand Up @@ -125,7 +125,7 @@ port = 4000
## FAQ

### 合库合表场景案例说明

根据配置文件的 route-rules 可以支持将分库分表的数据导入到同一个库同一个表中,但是在开始前需要检查分库分表规则:

+ 是否可以利用 route-rules 的语义规则表示
Expand Down
2 changes: 1 addition & 1 deletion dev/reference/tools/mydumper.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mydumper 包含在 tidb-enterprise-tools 安装包中,可[在此下载](/refer
## 相比于普通的 mydumper,此工具有哪些改进之处?

+ 使用 `tidb_snapshot` 而非 `FLUSH TABLES WITH READ LOCK` 提供备份一致性
+ [允许设置](/how-to/get-started/read-historical-data.md#操作流程) `tidb_snapshot` 的值(即可备份不同时间点的数据)
+ [允许设置](/how-to/get-started/read-historical-data.md#操作流程) `tidb_snapshot` 的值(即可备份不同时间点的数据)

### 新添参数

Expand Down
1 change: 0 additions & 1 deletion dev/reference/tools/sync-diff-inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ schema = "test"
# 需要检查的表的名称
tables = ["test"]


# 配置该表对应的分表的相关配置
[[table-config]]
# 目标库的名称
Expand Down
2 changes: 1 addition & 1 deletion dev/reference/transactions/transaction-pessimistic.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ default = true

- 其次是 session 变量 `tidb_txn_mode`

- 最后是配置文件里的 `default`,当使用普通的 `BEGIN` 语句,且 `tidb_txn_mode` 的值为空字符串 `''` 时,根据 `default` 来决定启用悲观事务还是乐观事务。
- 最后是配置文件里的 `default`,当使用普通的 `BEGIN` 语句,且 `tidb_txn_mode` 的值为空字符串 `''` 时,根据 `default` 来决定启用悲观事务还是乐观事务。

## 相关配置参数

Expand Down
2 changes: 1 addition & 1 deletion dev/releases/2.0.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ category: Releases
- 修复统计信息某些情况下对点查估算的问题 [#8493](https://github.com/pingcap/tidb/pull/8493)
- 修复某些情况下返回 Enum 默认值为字符串导致的 panic [#8476](https://github.com/pingcap/tidb/pull/8476)
- 修复在宽表场景下,占用太多内存的问题 [#8467](https://github.com/pingcap/tidb/pull/8467)
- 修复 Parser 对取模操作错误格式化导致的问题 [#8431](https://github.com/pingcap/tidb/pull/8431)
- 修复 Parser 对取模操作错误格式化导致的问题 [#8431](https://github.com/pingcap/tidb/pull/8431)
- 修复某些情况下添加外键约束导致的 panic 问题 [#8421](https://github.com/pingcap/tidb/pull/8421)[#8410](https://github.com/pingcap/tidb/pull/8410)
- 修复 `YEAR` 类型错误转换零值的问题 [#8396](https://github.com/pingcap/tidb/pull/8396)
- 修复 `VALUES` 函数在参数不为列的时候 panic 的问题 [#8404](https://github.com/pingcap/tidb/pull/8404)
Expand Down
4 changes: 2 additions & 2 deletions dev/releases/2.1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TiDB-Ansible 版本:2.1.8
- 统一日志格式规范,利于工具收集分析 [日志规范](https://github.com/tikv/rfcs/blob/master/text/2018-12-19-unified-log-format.md)
- 修复大量 NULL 值导致统计信息估算不准确的问题 [#9979](https://github.com/pingcap/tidb/pull/9979)
- 修复 TIMESTAMP 类型默认值为边界值的时候报错的问题 [#9987](https://github.com/pingcap/tidb/pull/9987)
- 检查设置 `time_zone` 值的合法性 [#10000](https://github.com/pingcap/tidb/pull/10000)
- 检查设置 `time_zone` 值的合法性 [#10000](https://github.com/pingcap/tidb/pull/10000)
- 支持时间格式 `2019.01.01` [#10001](https://github.com/pingcap/tidb/pull/10001)
- 修复某些情况下 `EXPLAIN` 结果中行数估计错误显示的问题 [#10044](https://github.com/pingcap/tidb/pull/10044)
- 修复 `KILL TIDB [session id]` 某些情况下无法快速停止语句执行的问题 [#9976](https://github.com/pingcap/tidb/pull/9976)
Expand All @@ -45,7 +45,7 @@ TiDB-Ansible 版本:2.1.8
## TiKV

- 修复读流量统计错误的问题 [#4441](https://github.com/tikv/tikv/pull/4441)
- 修复 Region 数过多的情况下 raftstore 的性能问题 [#4484](https://github.com/tikv/tikv/pull/4484)
- 修复 Region 数过多的情况下 raftstore 的性能问题 [#4484](https://github.com/tikv/tikv/pull/4484)
- 调整当 level 0 SST 数量超过 `level_zero_slowdown_writes_trigger/2` 时不再继续 ingest file [#4464](https://github.com/tikv/tikv/pull/4464)

## Tools
Expand Down
2 changes: 1 addition & 1 deletion dev/releases/2.1ga.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ category: Releases

+ 支持内建函数:

- `json_contains`
- `json_contains`
- `json_contains_path`
- `encode/decode`

Expand Down
2 changes: 1 addition & 1 deletion dev/releases/3.0.0-beta.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TiDB-Ansible 版本:3.0.0-beta.1
+ 增加 store 地址为维度的监控项,代替原有的 Store ID [#1429](https://github.com/pingcap/pd/pull/1429)
+ 优化 `GetStores` 开销,加快 Region 巡检周期 [#1410](https://github.com/pingcap/pd/pull/1410)
+ 新增删除 Tombstone Store 的接口 [#1472](https://github.com/pingcap/pd/pull/1472)

## TiKV

+ 优化 Coprocessor 计算执行框架,完成 TableScan 算子,单 TableScan 即扫表操作性能提升 5% ~ 30%
Expand Down
2 changes: 1 addition & 1 deletion dev/releases/3.0.0-rc.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TiDB Ansible 版本:3.0.0-rc.2
- 主动下发 operator 加快调度速度 [#1536](https://github.com/pingcap/pd/pull/1536)
- 添加 store limit 机制,限制单个 store 的调度速度 [#1474](https://github.com/pingcap/pd/pull/1474)
- 修复 `config` 状态不一致的问题 [#1476](https://github.com/pingcap/pd/pull/1476)

## TiKV

+ Engine
Expand Down
22 changes: 11 additions & 11 deletions v1.0/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# TiDB 中文技术文档

<!-- markdownlint-disable MD007 -->

## 目录

+ TiDB 简介与整体架构
- [TiDB 简介](overview.md#tidb-简介)
- [TiDB 整体架构](overview.md#tidb-整体架构)
- [TiDB 快速入门指南](QUICKSTART.md)
+ [TiDB 快速入门指南](QUICKSTART.md)
+ TiDB 用户文档
+ TiDB 数据库管理
- [TiDB 服务](sql/tidb-server.md)
Expand Down Expand Up @@ -73,7 +75,7 @@
- [历史数据回溯](op-guide/history-read.md)
+ TiDB 运维文档
- [软硬件环境需求](op-guide/recommendation.md)
+ 部署集群 
+ 部署集群
- [Ansible 部署方案(强烈推荐)](op-guide/ansible-deployment.md)
- [离线 Ansible 部署方案](op-guide/offline-ansible-deployment.md)
- [Docker 部署方案](op-guide/docker-deployment.md)
Expand Down Expand Up @@ -108,10 +110,10 @@
+ TiSpark 文档
- [TiSpark 快速入门指南](tispark/tispark-quick-start-guide.md)
- [TiSpark 用户指南](tispark/tispark-user-guide.md)
- [常见问题与解答(FAQ)](FAQ.md)
- [最佳实践](https://pingcap.com/blog-cn/tidb-best-practice/)
- [版本发布历史](releases/README.md)
- [TiDB 路线图](https://github.com/pingcap/docs-cn/blob/master/ROADMAP.md)
+ [常见问题与解答(FAQ)](FAQ.md)
+ [最佳实践](https://pingcap.com/blog-cn/tidb-best-practice/)
+ [版本发布历史](releases/README.md)
+ [TiDB 路线图](https://github.com/pingcap/docs-cn/blob/master/ROADMAP.md)
+ 用户案例
- [海航](http://t.cn/REXx0Qe)
- [Mobike](http://t.cn/RT8FbP6)
Expand All @@ -137,8 +139,6 @@
- [Weekly](https://pingcap.com/weekly/)
- [英文文档](https://pingcap.com/docs)



## TiDB 简介

TiDB 是 PingCAP 公司受 Google [Spanner](http://research.google.com/archive/spanner.html) / [F1](http://research.google.com/pubs/pub41344.html) 论文启发而设计的开源分布式 NewSQL 数据库。
Expand Down Expand Up @@ -195,14 +195,14 @@ TiKV Server 负责存储数据,从外部看 TiKV 是一个分布式的提供

高可用是 TiDB 的另一大特点,TiDB/TiKV/PD 这三个组件都能容忍部分实例失效,不影响整个集群的可用性。下面分别说明这三个组件的可用性、单个实例失效后的后果以及如何恢复。

+ TiDB
+ TiDB

TiDB 是无状态的,推荐至少部署两个实例,前端通过负载均衡组件对外提供服务。当单个实例失效时,会影响正在这个实例上进行的 Session,从应用的角度看,会出现单次请求失败的情况,重新连接后即可继续获得服务。单个实例失效后,可以重启这个实例或者部署一个新的实例。

+ PD
+ PD

PD 是一个集群,通过 Raft 协议保持数据的一致性,单个实例失效时,如果这个实例不是 Raft 的 leader,那么服务完全不受影响;如果这个实例是 Raft 的 leader,会重新选出新的 Raft leader,自动恢复服务。PD 在选举的过程中无法对外提供服务,这个时间大约是3秒钟。推荐至少部署三个 PD 实例,单个实例失效后,重启这个实例或者添加新的实例。

+ TiKV
+ TiKV

TiKV 是一个集群,通过 Raft 协议保持数据的一致性(副本数量可配置,默认保存三副本),并通过 PD 做负载均衡调度。单个节点失效时,会影响这个节点上存储的所有 Region。对于 Region 中的 Leader 节点,会中断服务,等待重新选举;对于 Region 中的 Follower 节点,不会影响服务。当某个 TiKV 节点失效,并且在一段时间内(默认 10 分钟)无法恢复,PD 会将其上的数据迁移到其他的 TiKV 节点上。
Loading

0 comments on commit 42f1fc0

Please sign in to comment.