From 68f4611362f65db4ff53be1c800341bc07d631cf Mon Sep 17 00:00:00 2001 From: yikeke Date: Wed, 11 Jul 2018 13:44:51 +0800 Subject: [PATCH 1/3] tools: add drainer output via: https://github.com/pingcap/docs-cn/pull/795 --- tools/tidb-binlog-kafka.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/tidb-binlog-kafka.md b/tools/tidb-binlog-kafka.md index fead483a7c4a6..222a6a21511bc 100644 --- a/tools/tidb-binlog-kafka.md +++ b/tools/tidb-binlog-kafka.md @@ -93,6 +93,20 @@ cd tidb-binlog-latest-linux-amd64 dir = "/path/pb-dir" ``` +- The drainer outputs `kafka` and you need to set the following parameters in the configuration file: + + ``` + [syncer] + db-type = "kafka" + + # when db-type is kafka, you can uncomment this to config the down stream kafka, or it will be the same kafka addrs where drainer pull binlog from. + # [syncer.to] + # kafka-addrs = "127.0.0.1:9092" + # kafka-version = "0.8.2.0" + ``` + + The data which outputs to kafka follows the binlog format sorted by ts and defined by protobuf. Please refer to [driver](https://github.com/pingcap/tidb-tools/tree/master/tidb_binlog/driver) to access the data and sync to the down stream. + - Deploy Kafka and ZooKeeper cluster before deploying TiDB-Binlog. Make sure that Kafka is 0.9 version or later. #### Recommended Kafka cluster configuration From 8fef8f44ec4188bb0e7d397324516eadbdcf7298 Mon Sep 17 00:00:00 2001 From: yikeke Date: Wed, 11 Jul 2018 15:54:59 +0800 Subject: [PATCH 2/3] op-guide: add description for txn-local-latches via: https://github.com/pingcap/docs-cn/pull/776 --- op-guide/tidb-config-file.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/op-guide/tidb-config-file.md b/op-guide/tidb-config-file.md index 82b9cd3ff2cb9..3dc48f236c131 100644 --- a/op-guide/tidb-config-file.md +++ b/op-guide/tidb-config-file.md @@ -222,3 +222,17 @@ The Plan Cache configuration of the `prepare` statement. - The maximum timeout time when executing a transaction commit - Default: 41s - It is required to set this value larger than twice of the Raft election timeout time + +### txn-local-latches + +Configuration about the transaction latch. It is recommended to enable it when many local transaction conflicts occur. + +### `enable` + +- To enable +- Default: false + +### `capacity` + +- The number of slots corresponding to Hash, which automatically adjusts upward to an exponential multiple of 2. Each slot occupies 32 Bytes of memory. If set too small, it may result in slower running speed and poor performance under the scenario where the range of written data is relatively wide (such as the imported data). +- Default: 1024000 From 3032574a281db130df194737eb0bddb862d99d85 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 12 Jul 2018 16:05:06 +0800 Subject: [PATCH 3/3] op-guide: address comment Via: https://github.com/pingcap/docs/pull/535/ --- op-guide/tidb-config-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op-guide/tidb-config-file.md b/op-guide/tidb-config-file.md index 3dc48f236c131..825b12d507c6d 100644 --- a/op-guide/tidb-config-file.md +++ b/op-guide/tidb-config-file.md @@ -234,5 +234,5 @@ Configuration about the transaction latch. It is recommended to enable it when m ### `capacity` -- The number of slots corresponding to Hash, which automatically adjusts upward to an exponential multiple of 2. Each slot occupies 32 Bytes of memory. If set too small, it may result in slower running speed and poor performance under the scenario where the range of written data is relatively wide (such as the imported data). -- Default: 1024000 +- The number of slots corresponding to Hash, which automatically adjusts upward to an exponential multiple of 2. Each slot occupies 32 Bytes of memory. If set too small, it might result in slower running speed and poor performance in the scenario where data writing covers a relatively large range (such as importing data). +- Default: 1024000