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

tools, media: update binlog's config file #1053

Merged
merged 12 commits into from
Apr 23, 2019
Binary file modified media/tidb_binlog_cluster_architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 27 additions & 9 deletions tools/tidb-binlog-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ The following part shows how to use Pump and Drainer based on the nodes above.

# the address of the PD cluster nodes
pd-urls = "http://192.168.0.16:2379,http://192.168.0.15:2379,http://192.168.0.14:2379"

# [storage]
# Set to true (by default) to ensure reliability and ensure binlog data is flushed to the disk
Copy link
Contributor

Choose a reason for hiding this comment

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

change and to by? because it is not coordinating relation between ensure reliability and ensure binlog data is flushed to the disk , but ensure binlog data is flushed to the disk => ensure reliability

IzabelWang marked this conversation as resolved.
Show resolved Hide resolved
# sync-log = true
```

- The example of starting Pump:
Expand Down Expand Up @@ -474,19 +478,20 @@ The following part shows how to use Pump and Drainer based on the nodes above.
# the directory of the log file
log-file = "drainer.log"

# Drainer compresses the data when it gets the binlog from Pump. The value can be "gzip". If it is not configured, it will not be compressed
# compressor = "gzip"

# Syncer Configuration
[syncer]
# If the item is set, the sql-mode will be used to parse the DDL statement.
# sql-mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

# the db filter list ("INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,test" by default)
# Does not support the Rename DDL operation on tables of `ignore schemas`.
ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql"

# the number of SQL statements of a transaction which are output to the downstream database (1 by default)
txn-batch = 1

# the number of SQL statements of a transaction that are output to the downstream database (20 by default)
txn-batch = 20

Copy link
Contributor

Choose a reason for hiding this comment

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

You missed "txn-batch = 20", and please add it.

# the number of the concurrency of the downstream for synchronization. The bigger the value,
# the better throughput performance of the concurrency (1 by default)
worker-count = 1
# the better throughput performance of the concurrency (16 by default)
worker-count = 16

# whether to disable the SQL feature of splitting a single binlog file. If it is set to "true",
# each binlog file is restored to a single transaction for synchronization based on the order of binlogs.
Expand All @@ -497,6 +502,10 @@ The following part shows how to use Pump and Drainer based on the nodes above.
# Valid value: "mysql", "kafka", "pb", "flash"
db-type = "mysql"

# the db filter list ("INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,test" by default)
# Does not support the Rename DDL operation on tables of `ignore schemas`.
ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql"

# `replicate-do-db` has priority over `replicate-do-table`. When they have the same `db` name,
# regular expressions are supported for configuration.
# The regular expression should start with "~".
Expand All @@ -511,6 +520,11 @@ The following part shows how to use Pump and Drainer based on the nodes above.
# db-name ="test"
# tbl-name = "~^a.*"

# Ignore the replication of some tables
# [[syncer.ignore-table]]
# db-name = "test"
# tbl-name = "log"

# the server parameters of the downstream database when `db-type` is set to "mysql"
[syncer.to]
host = "192.168.0.13"
Expand All @@ -527,6 +541,10 @@ The following part shows how to use Pump and Drainer based on the nodes above.
# zookeeper-addrs = "127.0.0.1:2181"
# kafka-addrs = "127.0.0.1:9092"
# kafka-version = "0.8.2.0"

# the topic name of the Kafka cluster that saves the binlog data. The default value is <cluster-id>_obinlog
# To run multiple Drainers to replicate data to the same Kafka cluster, you need to set different `topic-name`s for each Drainer.
# topic-name = ""
```

- The example of starting Drainer:
Expand Down