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 @@ -248,7 +248,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-4.0/docs/tidb_http_api.md) for more details.

### Region merge is slow

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 @@ -34,7 +34,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-4.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
2 changes: 1 addition & 1 deletion pd-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aliases: ['/docs/stable/pd-configuration-file/','/docs/v4.0/pd-configuration-fil

<!-- 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-4.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 @@ -114,7 +114,7 @@ The following topology documents provide a cluster configuration template for ea
> - 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-4.0/config/config.toml.example), [TiKV `config.toml.example`](https://github.com/tikv/tikv/blob/release-4.0/etc/config-template.toml), [PD `config.toml.example`](https://github.com/tikv/pd/blob/release-4.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 @@ -6,7 +6,7 @@ aliases: ['/docs/stable/sync-diff-inspector/sync-diff-inspector-overview/','/doc

# 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-4.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. You can download it at [tidb-enterprise-tools-nightly-linux-amd64](https://download.pingcap.org/tidb-enterprise-tools-nightly-linux-amd64.tar.gz).

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 @@ -274,8 +274,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-4.0/kafka_consumer)
- [Java demo](https://github.com/pingcap/ticdc/tree/release-4.0/demo/java)

## Column type code

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 @@ -118,11 +118,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-4.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-4.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
2 changes: 1 addition & 1 deletion tidb-binlog/binlog-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases: ['/docs/stable/tidb-binlog/binlog-control/','/docs/v4.0/tidb-binlog/bin

# binlogctl

[Binlog Control](https://github.com/pingcap/tidb-binlog/tree/master/binlogctl) (`binlogctl` for short) is a command line tool for TiDB Binlog. You can use `binlogctl` to manage TiDB Binlog clusters.
[Binlog Control](https://github.com/pingcap/tidb-binlog/tree/release-4.0/binlogctl) (`binlogctl` for short) is a command line tool for TiDB Binlog. You can use `binlogctl` to manage TiDB Binlog clusters.

You can use `binlogctl` to:

Expand Down
2 changes: 1 addition & 1 deletion tidb-binlog/maintain-tidb-binlog-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For how to pause, close, check, and modify the state of Drainer, see the [binlog

## Use `binlogctl` to manage Pump/Drainer

[`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-4.0/binlogctl) is an operations tool for TiDB Binlog with the following features:

* Checking the state of Pump or Drainer
* Pausing or closing Pump or Drainer
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 @@ -25,15 +25,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-4.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-4.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-4.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 All @@ -56,7 +56,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-4.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 @@ -9,7 +9,7 @@ aliases: ['/docs/stable/tidb-configuration-file/','/docs/v4.0/tidb-configuration

# 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-4.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/release-4.0/proto/pdpb.proto#L435) 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/release-4.0/proto/pdpb.proto#L284), including:

* Position of the leader itself
* Positions of other replicas
Expand Down
2 changes: 1 addition & 1 deletion tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aliases: ['/docs/stable/tikv-configuration-file/','/docs/v4.0/tikv-configuration

<!-- markdownlint-disable MD001 -->

The TiKV configuration file supports more options than command-line parameters. You can find the default configuration file in [etc/config-template.toml](https://github.com/tikv/tikv/blob/master/etc/config-template.toml) and rename it to `config.toml`.
The TiKV configuration file supports more options than command-line parameters. You can find the default configuration file in [etc/config-template.toml](https://github.com/tikv/tikv/blob/release-4.0/etc/config-template.toml) and rename it to `config.toml`.

This document only describes the parameters that are not included in command-line parameters. For more details, see [command-line parameter](/command-line-flags-for-tikv-configuration.md).

Expand Down
4 changes: 2 additions & 2 deletions tispark-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ For more information about the TiSpark architecture and how to use it, see [TiSp

## Topology templates

- [Simple TiSpark topology template](https://github.com/pingcap/docs/blob/master/config-templates/simple-tispark.yaml)
- [Complex TiSpark topology template](https://github.com/pingcap/docs/blob/master/config-templates/complex-tispark.yaml)
- [Simple TiSpark topology template](https://github.com/pingcap/docs/blob/release-4.0/config-templates/simple-tispark.yaml)
- [Complex TiSpark topology template](https://github.com/pingcap/docs/blob/release-4.0/config-templates/complex-tispark.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 tiup/tiup-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The TiUP playground component is mainly used to build a stand-alone development

## How do I write the topology file for the TiUP cluster component?

Refer to [these templates](https://github.com/pingcap/tiup/tree/master/examples) to write the topology file. The templates include:
Refer to [these templates](https://github.com/pingcap/tiup/tree/master/embed/templates/examples) to write the topology file. The templates include:

- Multi-DC deployment topology
- Minimal deployment topology
Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ This command starts Prometheus on port 9090 to display the time series data in t

### Override PD's default configuration

First, you need to copy the [PD configuration template](https://github.com/pingcap/pd/blob/master/conf/config.toml). Assume you place the copied file to `~/config/pd.toml` and make some changes according to your need, then you can execute the following command to override PD's default configuration:
First, you need to copy the [PD configuration template](https://github.com/tikv/pd/blob/release-4.0/conf/config.toml). Assume you place the copied file to `~/config/pd.toml` and make some changes according to your need, then you can execute the following command to override PD's default configuration:

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

Expand Down
6 changes: 3 additions & 3 deletions troubleshoot-lock-conflicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ Solutions:
* If the above error occurs frequently, it is recommended to adjust the application logic.

#### TTL manager has timed out
The transaction execution time can not exceed the GC time limit. In addition, the TTL time of pessimistic transactions has an upper limit, whose default value is 10 minutes. Therefore, a pessimistic transaction executed for more than 10 minutes will fail to commit. This timeout threshold is controlled by the TiDB parameter [performance.max-txn-ttl](https://github.com/pingcap/tidb/blob/master/config/config.toml.example).

The transaction execution time can not exceed the GC time limit. In addition, the TTL time of pessimistic transactions has an upper limit, whose default value is 10 minutes. Therefore, a pessimistic transaction executed for more than 10 minutes will fail to commit. This timeout threshold is controlled by the TiDB parameter [performance.max-txn-ttl](https://github.com/pingcap/tidb/blob/release-4.0/config/config.toml.example).

When the execution time of a pessimistic transaction exceeds the TTL time, the following error message occurs in the TiDB log:

Expand All @@ -215,7 +215,7 @@ TTL manager has timed out, pessimistic locks may expire, please commit or rollba

Solutions:

* First, confirm whether the application logic can be optimized. For example, large transactions may trigger TiDB's transaction size limit, which can be split into multiple small transactions.
* First, confirm whether the application logic can be optimized. For example, large transactions may trigger TiDB's transaction size limit, which can be split into multiple small transactions.
* Also, you can adjust the related parameters properly to meet the application transaction logic.

#### Deadlock found when trying to get lock
Expand Down