Skip to content
Merged
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
2 changes: 1 addition & 1 deletion best-practices/pd-scheduling-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Hot regions scheduling issues generally fall into the following categories:

- The load of some nodes is significantly higher than that of other nodes from TiKV-related metrics, which becomes the bottleneck of the whole system. Currently, PD counts hotspots through traffic analysis only, so it is possible that PD fails to identify hotspots in certain scenarios. For example, when there are intensive point lookup requests for some regions, it might not be obvious to detect in traffic, but still the high QPS might lead to bottlenecks in key modules.

**Solutions**: Firstly, locate the table where hot regions are formed based on the specific business. Then add a `scatter-range-scheduler` scheduler to make all regions of this table evenly distributed. TiDB also provides an interface in its HTTP API to simplify this operation. Refer to [TiDB HTTP API](https://github.com/pingcap/tidb/blob/master/docs/tidb_http_api.md) for more details.
**Solutions**: Firstly, locate the table where hot regions are formed based on the specific business. Then add a `scatter-range-scheduler` scheduler to make all regions of this table evenly distributed. TiDB also provides an interface in its HTTP API to simplify this operation. Refer to [TiDB HTTP API](https://github.com/pingcap/tidb/blob/release-5.0/docs/tidb_http_api.md) for more details.

### Region merge is slow

Expand Down
2 changes: 1 addition & 1 deletion expression-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The expressions can be divided into the following types:

- ParamMarker (`?`), system variables, user variables and CASE expressions.

The following rules are the expression syntax, which is based on the [parser.y](https://github.com/pingcap/parser/blob/master/parser.y) rules of TiDB parser. For the navigable version of the following syntax diagram, refer to [TiDB SQL Syntax Diagram](https://pingcap.github.io/sqlgram/#Expression).
The following rules are the expression syntax, which is based on the [parser.y](https://github.com/pingcap/parser/blob/release-5.0/parser.y) rules of TiDB parser. For the navigable version of the following syntax diagram, refer to [TiDB SQL Syntax Diagram](https://pingcap.github.io/sqlgram/#Expression).

```ebnf+diagram
Expression ::=
Expand Down
2 changes: 1 addition & 1 deletion functions-and-operators/precision-math.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ DECIMAL columns do not store a leading `+` character or `-` character or leading

DECIMAL columns do not permit values larger than the range implied by the column definition. For example, a `DECIMAL(3,0)` column supports a range of `-999` to `999`. A `DECIMAL(M,D)` column permits at most `M - D` digits to the left of the decimal point.

For more information about the internal format of the DECIMAL values, see [`mydecimal.go`](https://github.com/pingcap/tidb/blob/master/types/mydecimal.go) in TiDB souce code.
For more information about the internal format of the DECIMAL values, see [`mydecimal.go`](https://github.com/pingcap/tidb/blob/release-5.0/types/mydecimal.go) in TiDB souce code.

## Expression handling

Expand Down
2 changes: 1 addition & 1 deletion geo-distributed-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This document takes the typical architecture of three data centers (DC) in two c

### Topology templates

- [The geo-distributed topology template](https://github.com/pingcap/docs/blob/master/config-templates/geo-redundancy-deployment.yaml)
- [The geo-distributed topology template](https://github.com/pingcap/docs/blob/release-5.0/config-templates/geo-redundancy-deployment.yaml)

For detailed descriptions of the configuration items in the above TiDB cluster topology file, see [Topology Configuration File for Deploying TiDB Using TiUP](/tiup/tiup-cluster-topology-reference.md).

Expand Down
4 changes: 2 additions & 2 deletions hybrid-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The deployment machine has multiple CPU processors with sufficient memory. To im

### Topology templates

- [The simple template for the hybrid deployment](https://github.com/pingcap/docs-cn/blob/master/config-templates/simple-multi-instance.yaml)
- [The complex template for the hybrid deployment](https://github.com/pingcap/docs/blob/master/config-templates/complex-multi-instance.yaml)
- [The simple template for the hybrid deployment](https://github.com/pingcap/docs/blob/release-5.0/config-templates/simple-multi-instance.yaml)
- [The complex template for the hybrid deployment](https://github.com/pingcap/docs/blob/release-5.0/config-templates/complex-multi-instance.yaml)

For detailed descriptions of the configuration items in the above TiDB cluster topology file, see [Topology Configuration File for Deploying TiDB Using TiUP](/tiup/tiup-cluster-topology-reference.md).

Expand Down
2 changes: 1 addition & 1 deletion information-schema/information-schema-cluster-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Field description:

* `TYPE`: The instance type. The optional values are `tidb`, `pd`, and `tikv`.
* `INSTANCE`: The instance address, which is a string in the format of `IP:PORT`.
* `STATUS_ADDRESS`: The service address of HTTP API. Some commands in tikv-ctl, pd-ctl, or tidb-ctl might use this API and this address. You can also get more cluster information via this address. Refer to [TiDB HTTP API document](https://github.com/pingcap/tidb/blob/master/docs/tidb_http_api.md) for details.
* `STATUS_ADDRESS`: The service address of HTTP API. Some commands in tikv-ctl, pd-ctl, or tidb-ctl might use this API and this address. You can also get more cluster information via this address. Refer to [TiDB HTTP API document](https://github.com/pingcap/tidb/blob/release-5.0/docs/tidb_http_api.md) for details.
* `VERSION`: The semantic version number of the corresponding instance. To be compatible with the MySQL version number, the TiDB version is displayed in the format of `${mysql-version}-${tidb-version}`.
* `GIT_HASH`: The Git Commit Hash when compiling the instance version, which is used to identify whether two instances are of the absolutely consistent version.
* `START_TIME`: The starting time of the corresponding instance.
Expand Down
4 changes: 2 additions & 2 deletions minimal-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ This document describes the minimal deployment topology of TiDB clusters.

### Topology templates

- [The simple template for the minimal topology](https://github.com/pingcap/docs/blob/master/config-templates/simple-mini.yaml)
- [The complex template for the minimal topology](https://github.com/pingcap/docs/blob/master/config-templates/complex-mini.yaml)
- [The simple template for the minimal topology](https://github.com/pingcap/docs/blob/release-5.0/config-templates/simple-mini.yaml)
- [The complex template for the minimal topology](https://github.com/pingcap/docs/blob/release-5.0/config-templates/complex-mini.yaml)

For detailed descriptions of the configuration items in the above TiDB cluster topology file, see [Topology Configuration File for Deploying TiDB Using TiUP](/tiup/tiup-cluster-topology-reference.md).

Expand Down
2 changes: 1 addition & 1 deletion pd-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ summary: Learn the PD configuration file.

<!-- markdownlint-disable MD001 -->

The PD configuration file supports more options than command-line parameters. You can find the default configuration file [here](https://github.com/pingcap/pd/blob/master/conf/config.toml).
The PD configuration file supports more options than command-line parameters. You can find the default configuration file [here](https://github.com/tikv/pd/blob/release-5.0/conf/config.toml).

This document only describes parameters that are not included in command-line parameters. Check [here](/command-line-flags-for-pd-configuration.md) for the command line parameters.

Expand Down
2 changes: 1 addition & 1 deletion production-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ The following examples cover six common scenarios. You need to modify the config
> - For parameters that should be globally effective, configure these parameters of corresponding components in the `server_configs` section of the configuration file.
> - For parameters that should be effective on a specific node, configure these parameters in the `config` of this node.
> - Use `.` to indicate the subcategory of the configuration, such as `log.slow-threshold`. For more formats, see [TiUP configuration template](https://github.com/pingcap/tiup/blob/master/embed/templates/examples/topology.example.yaml).
> - For more parameter description, see [TiDB `config.toml.example`](https://github.com/pingcap/tidb/blob/master/config/config.toml.example), [TiKV `config.toml.example`](https://github.com/tikv/tikv/blob/master/etc/config-template.toml), [PD `config.toml.example`](https://github.com/pingcap/pd/blob/master/conf/config.toml), and [TiFlash configuration](/tiflash/tiflash-configuration.md).
> - For more parameter description, see [TiDB `config.toml.example`](https://github.com/pingcap/tidb/blob/release-5.0/config/config.toml.example), [TiKV `config.toml.example`](https://github.com/tikv/tikv/blob/release-5.0/etc/config-template.toml), [PD `config.toml.example`](https://github.com/tikv/pd/blob/release-5.0/conf/config.toml), and [TiFlash configuration](/tiflash/tiflash-configuration.md).

## Step 4: Execute the deployment command

Expand Down
2 changes: 1 addition & 1 deletion sync-diff-inspector/sync-diff-inspector-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ summary: Use sync-diff-inspector to compare data and repair inconsistent data.

# sync-diff-inspector User Guide

[sync-diff-inspector](https://github.com/pingcap/tidb-tools/tree/master/sync_diff_inspector) is a tool used to compare data stored in the databases with the MySQL protocol. For example, it can compare the data in MySQL with that in TiDB, the data in MySQL with that in MySQL, or the data in TiDB with that in TiDB. In addition, you can also use this tool to repair data in the scenario where a small amount of data is inconsistent.
[sync-diff-inspector](https://github.com/pingcap/tidb-tools/tree/release-5.0/sync_diff_inspector) is a tool used to compare data stored in the databases with the MySQL protocol. For example, it can compare the data in MySQL with that in TiDB, the data in MySQL with that in MySQL, or the data in TiDB with that in TiDB. In addition, you can also use this tool to repair data in the scenario where a small amount of data is inconsistent.

This guide introduces the key features of sync-diff-inspector and describes how to configure and use this tool. To download sync-diff-inspector, use one of the following methods:

Expand Down
4 changes: 2 additions & 2 deletions ticdc-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ TiCDC is a tool for replicating the incremental data of TiDB, introduced in TiDB

### Topology templates

- [The simple template for the TiCDC topology](https://github.com/pingcap/docs/blob/master/config-templates/simple-cdc.yaml)
- [The complex template for the TiCDC topology](https://github.com/pingcap/docs/blob/master/config-templates/complex-cdc.yaml)
- [The simple template for the TiCDC topology](https://github.com/pingcap/docs/blob/release-5.0/config-templates/simple-cdc.yaml)
- [The complex template for the TiCDC topology](https://github.com/pingcap/docs/blob/release-5.0/config-templates/complex-cdc.yaml)

For detailed descriptions of the configuration items in the above TiDB cluster topology file, see [Topology Configuration File for Deploying TiDB Using TiUP](/tiup/tiup-cluster-topology-reference.md).

Expand Down
4 changes: 2 additions & 2 deletions ticdc/ticdc-open-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ COMMIT;

Currently, TiCDC does not provide the standard parsing library for TiCDC Open Protocol, but the Golang version and Java version of parsing demonstrations are provided. You can refer to the data format provided in this document and the following demonstrations to implement the protocol parsing for consumers.

- [Golang demo](https://github.com/pingcap/ticdc/tree/master/kafka_consumer)
- [Java demo](https://github.com/pingcap/ticdc/tree/master/demo/java)
- [Golang demo](https://github.com/pingcap/ticdc/tree/release-5.0/kafka_consumer)
- [Java demo](https://github.com/pingcap/ticdc/tree/release-5.0/demo/java)

## Column type code

Expand Down
6 changes: 3 additions & 3 deletions tidb-binlog-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ TiDB Binlog is the widely used component for replicating incremental data. It pr

### Topology templates

- [The simple template for the TiDB Binlog topology (with `mysql` as the downstream type)](https://github.com/pingcap/docs/blob/master/config-templates/simple-tidb-binlog.yaml)
- [The simple template for the TiDB Binlog topology (with `file` as the downstream type)](https://github.com/pingcap/docs/blob/master/config-templates/simple-file-binlog.yaml)
- [The complex template for the TiDB Binlog topology](https://github.com/pingcap/docs/blob/master/config-templates/complex-tidb-binlog.yaml)
- [The simple template for the TiDB Binlog topology (with `mysql` as the downstream type)](https://github.com/pingcap/docs/blob/release-5.0/config-templates/simple-tidb-binlog.yaml)
- [The simple template for the TiDB Binlog topology (with `file` as the downstream type)](https://github.com/pingcap/docs/blob/release-5.0/config-templates/simple-file-binlog.yaml)
- [The complex template for the TiDB Binlog topology](https://github.com/pingcap/docs/blob/release-5.0/config-templates/complex-tidb-binlog.yaml)

For detailed descriptions of the configuration items in the above TiDB cluster topology file, see [Topology Configuration File for Deploying TiDB Using TiUP](/tiup/tiup-cluster-topology-reference.md).

Expand Down
4 changes: 2 additions & 2 deletions tidb-binlog/binlog-consumer-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ message Binlog {
}
```

For the definition of the data format, see [`binlog.proto`](https://github.com/pingcap/tidb-tools/blob/master/tidb-binlog/proto/proto/binlog.proto).
For the definition of the data format, see [`binlog.proto`](https://github.com/pingcap/tidb-tools/blob/release-5.0/tidb-binlog/proto/proto/binlog.proto).

### Driver

The [TiDB-Tools](https://github.com/pingcap/tidb-tools/) project provides [Driver](https://github.com/pingcap/tidb-tools/tree/master/tidb-binlog/driver), which is used to read the binlog data in Kafka. It has the following features:
The [TiDB-Tools](https://github.com/pingcap/tidb-tools/) project provides [Driver](https://github.com/pingcap/tidb-tools/tree/release-5.0/tidb-binlog/driver), which is used to read the binlog data in Kafka. It has the following features:

* Read the Kafka data.
* Locate the binlog stored in Kafka based on `commit ts`.
Expand Down
4 changes: 2 additions & 2 deletions tidb-binlog/tidb-binlog-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document introduces the configuration items of TiDB Binlog.

## Pump

This section introduces the configuration items of Pump. For the example of a complete Pump configuration file, see [Pump Configuration](https://github.com/pingcap/tidb-binlog/blob/master/cmd/pump/pump.toml).
This section introduces the configuration items of Pump. For the example of a complete Pump configuration file, see [Pump Configuration](https://github.com/pingcap/tidb-binlog/blob/release-5.0/cmd/pump/pump.toml).

### addr

Expand Down Expand Up @@ -128,7 +128,7 @@ For the detailed description of the above items, see [GoLevelDB Document](https:

## Drainer

This section introduces the configuration items of Drainer. For the example of a complete Drainer configuration file, see [Drainer Configuration](https://github.com/pingcap/tidb-binlog/blob/master/cmd/drainer/drainer.toml)
This section introduces the configuration items of Drainer. For the example of a complete Drainer configuration file, see [Drainer Configuration](https://github.com/pingcap/tidb-binlog/blob/release-5.0/cmd/drainer/drainer.toml)

### addr

Expand Down
8 changes: 4 additions & 4 deletions tidb-binlog/tidb-binlog-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ The TiDB Binlog cluster is composed of Pump and Drainer.

### Pump

[Pump](https://github.com/pingcap/tidb-binlog/blob/master/pump) is used to record the binlogs generated in TiDB, sort the binlogs based on the commit time of the transaction, and send binlogs to Drainer for consumption.
[Pump](https://github.com/pingcap/tidb-binlog/blob/release-5.0/pump) is used to record the binlogs generated in TiDB, sort the binlogs based on the commit time of the transaction, and send binlogs to Drainer for consumption.

### Drainer

[Drainer](https://github.com/pingcap/tidb-binlog/tree/master/drainer) collects and merges binlogs from each Pump, converts the binlog to SQL or data of a specific format, and replicates the data to a specific downstream platform.
[Drainer](https://github.com/pingcap/tidb-binlog/tree/release-5.0/drainer) collects and merges binlogs from each Pump, converts the binlog to SQL or data of a specific format, and replicates the data to a specific downstream platform.

### `binlogctl` guide

[`binlogctl`](https://github.com/pingcap/tidb-binlog/tree/master/binlogctl) is an operations tool for TiDB Binlog with the following features:
[`binlogctl`](https://github.com/pingcap/tidb-binlog/tree/release-5.0/binlogctl) is an operations tool for TiDB Binlog with the following features:

* Obtaining the current `tso` of TiDB cluster
* Checking the Pump/Drainer state
Expand Down Expand Up @@ -65,7 +65,7 @@ The TiDB Binlog cluster is composed of Pump and Drainer.

* Drainer supports replicating binlogs to MySQL, TiDB, Kafka or local files. If you need to replicate binlogs to other Drainer unsuppored destinations, you can set Drainer to replicate the binlog to Kafka and read the data in Kafka for customized processing according to binlog consumer protocol. See [Binlog Consumer Client User Guide](/tidb-binlog/binlog-consumer-client.md).

* To use TiDB Binlog for recovering incremental data, set the config `db-type` to `file` (local files in the proto buffer format). Drainer converts the binlog to data in the specified [proto buffer format](https://github.com/pingcap/tidb-binlog/blob/master/proto/binlog.proto) and writes the data to local files. In this way, you can use [Reparo](/tidb-binlog/tidb-binlog-reparo.md) to recover data incrementally.
* To use TiDB Binlog for recovering incremental data, set the config `db-type` to `file` (local files in the proto buffer format). Drainer converts the binlog to data in the specified [proto buffer format](https://github.com/pingcap/tidb-binlog/blob/release-5.0/proto/binlog.proto) and writes the data to local files. In this way, you can use [Reparo](/tidb-binlog/tidb-binlog-reparo.md) to recover data incrementally.

Pay attention to the value of `db-type`:

Expand Down
2 changes: 1 addition & 1 deletion tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ summary: Learn the TiDB configuration file options that are not involved in comm

# TiDB Configuration File

The TiDB configuration file supports more options than command-line parameters. You can download the default configuration file [`config.toml.example`](https://github.com/pingcap/tidb/blob/master/config/config.toml.example) and rename it to `config.toml`. This document describes only the options that are not involved in [command line options](/command-line-flags-for-tidb-configuration.md).
The TiDB configuration file supports more options than command-line parameters. You can download the default configuration file [`config.toml.example`](https://github.com/pingcap/tidb/blob/release-5.0/config/config.toml.example) and rename it to `config.toml`. This document describes only the options that are not involved in [command line options](/command-line-flags-for-tidb-configuration.md).

### `split-table`

Expand Down
4 changes: 2 additions & 2 deletions tidb-scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Scheduling is based on information collection. In short, the PD scheduling compo

- State information reported by each TiKV peer:

Each TiKV peer sends heartbeats to PD periodically. PD not only checks whether the store is alive, but also collects [`StoreState`](https://github.com/pingcap/kvproto/blob/release-3.1/proto/pdpb.proto#L421) in the heartbeat message. `StoreState` includes:
Each TiKV peer sends heartbeats to PD periodically. PD not only checks whether the store is alive, but also collects [`StoreState`](https://github.com/pingcap/kvproto/blob/master/proto/pdpb.proto#L473) in the heartbeat message. `StoreState` includes:

* Total disk space
* Available disk space
Expand All @@ -79,7 +79,7 @@ Scheduling is based on information collection. In short, the PD scheduling compo

- Information reported by Region leaders:

Each Region leader sends heartbeats to PD periodically to report [`RegionState`](https://github.com/pingcap/kvproto/blob/release-3.1/proto/pdpb.proto#L271), including:
Each Region leader sends heartbeats to PD periodically to report [`RegionState`](https://github.com/pingcap/kvproto/blob/master/proto/pdpb.proto#L312), including:

* Position of the leader itself
* Positions of other replicas
Expand Down
Loading