Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-guide: add description for txn-local-latches #535

Merged
merged 4 commits into from
Jul 16, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
14 changes: 14 additions & 0 deletions op-guide/tidb-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the last sentence to:

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
14 changes: 14 additions & 0 deletions tools/tidb-binlog-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down