Skip to content

Commit

Permalink
Merge pull request #1236 from WangXiangUSTC/xiang/update_binlog
Browse files Browse the repository at this point in the history
tools, media: update binlog's config file
  • Loading branch information
CaitinChen authored Apr 16, 2019
2 parents b1df6ec + fc8a26a commit 34ec974
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
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.
34 changes: 26 additions & 8 deletions tools/tidb-binlog-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ Drainer="192.168.0.13"
# PD 集群节点的地址
pd-urls = "http://192.168.0.16:2379,http://192.168.0.15:2379,http://192.168.0.14:2379"
# [storage]
# 设置为 true(默认值)来保证可靠性,确保 binlog 数据刷新到磁盘
# sync-log = true
```
- 启动示例
Expand Down Expand Up @@ -460,18 +464,19 @@ Drainer="192.168.0.13"
# log 文件路径
log-file = "drainer.log"
# Drainer 从 Pump 获取 binlog 时对数据进行压缩,值可以为 "gzip",如果不配置则不进行压缩
# compressor = "gzip"
# Syncer Configuration
[syncer]
# 如果设置了该项,会使用该 sql-mode 解析 DDL 语句
# sql-mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
# db 过滤列表 (默认 "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,test"),
# 不支持对 ignore schemas 的 table 进行 rename DDL 操作
ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql"
# 输出到下游数据库一个事务的 SQL 数量 (默认 1)
txn-batch = 1
# 输出到下游数据库一个事务的 SQL 语句数量 (默认 20)
txn-batch = 20
# 同步下游的并发数,该值设置越高同步的吞吐性能越好 (默认 1)
worker-count = 1
# 同步下游的并发数,该值设置越高同步的吞吐性能越好 (默认 16)
worker-count = 16
# 是否禁用拆分单个 binlog 的 SQL 的功能,如果设置为 true,则按照每个 binlog
# 顺序依次还原成单个事务进行同步(下游服务类型为 MySQL, 该项设置为 False)
Expand All @@ -481,6 +486,10 @@ Drainer="192.168.0.13"
# 参数有效值为 "mysql","pb","kafka","flash"
db-type = "mysql"
# db 过滤列表 (默认 "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,test"),
# 不支持对 ignore schemas 的 table 进行 rename DDL 操作
ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql"
# replicate-do-db 配置的优先级高于 replicate-do-table。如果配置了相同的库名,支持使用正则表达式进行配置。
# 以 '~' 开始声明使用正则表达式
Expand All @@ -494,6 +503,11 @@ Drainer="192.168.0.13"
# db-name ="test"
# tbl-name = "~^a.*"
# 忽略同步某些表
# [[syncer.ignore-table]]
# db-name = "test"
# tbl-name = "log"
# db-type 设置为 mysql 时,下游数据库服务器参数
[syncer.to]
host = "192.168.0.13"
Expand All @@ -510,6 +524,10 @@ Drainer="192.168.0.13"
# zookeeper-addrs = "127.0.0.1:2181"
# kafka-addrs = "127.0.0.1:9092"
# kafka-version = "0.8.2.0"
# 保存 binlog 数据的 Kafka 集群的 topic 名称,默认值为 <cluster-id>_obinlog
# 如果运行多个 Drainer 同步数据到同一个 Kafka 集群,每个 Drainer 的 topic-name 需要设置不同的名称
# topic-name = ""
```
- 启动示例
Expand Down
2 changes: 1 addition & 1 deletion tools/tidb-binlog-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ category: tools

#### Execute Time

- 在下游执行 SQL/写数据所消耗的时间
- 在下游执行 SQL 语句或写数据所消耗的时间

#### 95% Binlog Size

Expand Down

0 comments on commit 34ec974

Please sign in to comment.