From f907699008c5628411834b60f6539d9a4f42e4cd Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Thu, 15 Jul 2021 18:16:30 +0200 Subject: [PATCH 1/3] updated-binlog-docs-for-commits-and-passoword --- tidb-binlog/deploy-tidb-binlog.md | 4 ++-- tidb-binlog/tidb-binlog-configuration-file.md | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tidb-binlog/deploy-tidb-binlog.md b/tidb-binlog/deploy-tidb-binlog.md index 9ea71792321b1..26c6fd8eded03 100644 --- a/tidb-binlog/deploy-tidb-binlog.md +++ b/tidb-binlog/deploy-tidb-binlog.md @@ -330,9 +330,9 @@ The following part shows how to use Pump and Drainer based on the nodes above. [syncer.to] host = "192.168.0.13" user = "root" + # If you don’t want to set a cleartext `password` in the configuration file, you can create `encrypted_password` using `./binlogctl -cmd encrypt -text string`. + # When you create `encrypted_password` and it is not empty, the `password` above will be ignored, because `encrypted_password` and `password` can’t take effect at the same time. password = "" - # `encrypted_password` is encrypted using `./binlogctl -cmd encrypt -text string`. - # When `encrypted_password` is not empty, the `password` above will be ignored. encrypted_password = "" port = 3306 diff --git a/tidb-binlog/tidb-binlog-configuration-file.md b/tidb-binlog/tidb-binlog-configuration-file.md index 2aebbd0d6aa9f..2a26b00671813 100644 --- a/tidb-binlog/tidb-binlog-configuration-file.md +++ b/tidb-binlog/tidb-binlog-configuration-file.md @@ -172,8 +172,12 @@ This section introduces the configuration items of Drainer. For the example of a ### initial-commit-ts -* Specifies from which commit timestamp the replication task starts. This configuration is only applicable to the Drainer node that starts replication for the first time. If a checkpoint already exists downstream, the replication will be performed according to the time recorded in the checkpoint. -* Default value: `-1`. Drainer will get a new timestamp from PD as the starting time. +* Specifies from which specific point in time for the transaction commit (transaction commit ts) the synchronization process starts. This configuration is only applicable to the Drainer node that starts synchronization for the first time. If a checkpoint already exists downstream, the synchronization will be performed according to the time recorded in the checkpoint. +* commit ts (commit timestamp) is a specific point in time for TiDB [Transactions](https://docs.pingcap.com/tidb/stable/transaction-overview#transactions) commit. It is a globally unique and increasing timestamp from PD as the unique transaction ID of the current transaction. The followings are typical methods to get configured `initial-commit-ts`: + - backupTS from the metadata backed up using BR (backupmeta) + - Pos from the metadata backed up using Dumpling (metadata) + - The output of command `tso` in PD Control +* Default value: `-1`. Drainer will get a new timestamp from PD as the starting time. That is, the synchronization process starts from the current time. ### synced-check-time From 268f4e4b312481c556acce68e26b6a1992a7bbef Mon Sep 17 00:00:00 2001 From: Enwei Date: Fri, 16 Jul 2021 09:15:22 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tidb-binlog/deploy-tidb-binlog.md | 4 ++-- tidb-binlog/tidb-binlog-configuration-file.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tidb-binlog/deploy-tidb-binlog.md b/tidb-binlog/deploy-tidb-binlog.md index 26c6fd8eded03..ab0a23b30abd2 100644 --- a/tidb-binlog/deploy-tidb-binlog.md +++ b/tidb-binlog/deploy-tidb-binlog.md @@ -330,8 +330,8 @@ The following part shows how to use Pump and Drainer based on the nodes above. [syncer.to] host = "192.168.0.13" user = "root" - # If you don’t want to set a cleartext `password` in the configuration file, you can create `encrypted_password` using `./binlogctl -cmd encrypt -text string`. - # When you create `encrypted_password` and it is not empty, the `password` above will be ignored, because `encrypted_password` and `password` can’t take effect at the same time. + # If you do not want to set a cleartext `password` in the configuration file, you can create `encrypted_password` using `./binlogctl -cmd encrypt -text string`. + # When you have created an `encrypted_password` that is not empty, the `password` above will be ignored, because `encrypted_password` and `password` cannot take effect at the same time. password = "" encrypted_password = "" port = 3306 diff --git a/tidb-binlog/tidb-binlog-configuration-file.md b/tidb-binlog/tidb-binlog-configuration-file.md index 2a26b00671813..94d0abfb68e03 100644 --- a/tidb-binlog/tidb-binlog-configuration-file.md +++ b/tidb-binlog/tidb-binlog-configuration-file.md @@ -172,12 +172,12 @@ This section introduces the configuration items of Drainer. For the example of a ### initial-commit-ts -* Specifies from which specific point in time for the transaction commit (transaction commit ts) the synchronization process starts. This configuration is only applicable to the Drainer node that starts synchronization for the first time. If a checkpoint already exists downstream, the synchronization will be performed according to the time recorded in the checkpoint. -* commit ts (commit timestamp) is a specific point in time for TiDB [Transactions](https://docs.pingcap.com/tidb/stable/transaction-overview#transactions) commit. It is a globally unique and increasing timestamp from PD as the unique transaction ID of the current transaction. The followings are typical methods to get configured `initial-commit-ts`: - - backupTS from the metadata backed up using BR (backupmeta) - - Pos from the metadata backed up using Dumpling (metadata) - - The output of command `tso` in PD Control -* Default value: `-1`. Drainer will get a new timestamp from PD as the starting time. That is, the synchronization process starts from the current time. +* Specifies from which commit timestamp of the transaction the replication process starts. This configuration is applicable only to the Drainer node that is in the replication process for the first time. If a checkpoint already exists in the downstream, the replication will be performed according to the time recorded in the checkpoint. +* commit ts (commit timestamp) is a specific point in time for [transaction](/transaction-overview#transactions) commits in TiDB. It is a globally unique and increasing timestamp from PD as the unique ID of the current transaction. You can get the `initial-commit-ts` configuration in the following typical ways: + - If BR is used, you can get `initial-commit-ts` from the backup TS recorded in the metadata backed up by BR (backupmeta). + - If Dumpling is used, you can get `initial-commit-ts` from the Pos recorded in the metadata backed up by Dumpling (metadata), + - If PD Control is used, `initial-commit-ts` is in the output of the `tso` command. +* Default value: `-1`. Drainer will get a new timestamp from PD as the starting time, which means that the replication process starts from the current time. ### synced-check-time From 41350a1a4165dbd5c60f217fd3ec58ca40123f30 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Fri, 16 Jul 2021 17:45:30 +0800 Subject: [PATCH 3/3] Update tidb-binlog/tidb-binlog-configuration-file.md --- tidb-binlog/tidb-binlog-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-binlog/tidb-binlog-configuration-file.md b/tidb-binlog/tidb-binlog-configuration-file.md index 94d0abfb68e03..3e558f1a6eed3 100644 --- a/tidb-binlog/tidb-binlog-configuration-file.md +++ b/tidb-binlog/tidb-binlog-configuration-file.md @@ -173,7 +173,7 @@ This section introduces the configuration items of Drainer. For the example of a ### initial-commit-ts * Specifies from which commit timestamp of the transaction the replication process starts. This configuration is applicable only to the Drainer node that is in the replication process for the first time. If a checkpoint already exists in the downstream, the replication will be performed according to the time recorded in the checkpoint. -* commit ts (commit timestamp) is a specific point in time for [transaction](/transaction-overview#transactions) commits in TiDB. It is a globally unique and increasing timestamp from PD as the unique ID of the current transaction. You can get the `initial-commit-ts` configuration in the following typical ways: +* commit ts (commit timestamp) is a specific point in time for [transaction](/transaction-overview.md#transactions) commits in TiDB. It is a globally unique and increasing timestamp from PD as the unique ID of the current transaction. You can get the `initial-commit-ts` configuration in the following typical ways: - If BR is used, you can get `initial-commit-ts` from the backup TS recorded in the metadata backed up by BR (backupmeta). - If Dumpling is used, you can get `initial-commit-ts` from the Pos recorded in the metadata backed up by Dumpling (metadata), - If PD Control is used, `initial-commit-ts` is in the output of the `tso` command.