# Base Configuration.

# sub task name as identifier, should be unique
name = "hanfei"

# sub task mode, can be `all`, `full`, `incremental`
mode = "incremental"

# used for binlog replication 
server-id = 101
source-id = "127.0.0.1:3306"

# which flavor mysql/mariadb
flavor = "mysql"

# meta schema in downstreaming database to store meta informaton of dm
meta-schema = "dm_meta"
# whether to disable heartbeat for calculating lag between master and syncer
disable-heartbeat = true 

# replicate from relay log or remote binlog
binlog-type = "remote"

# Mydumper configuration

# -t, --threads
#threads = 16

# -F, --chunk-filesize
#chunk-filesize = 64

# --skip-tz-utc
#skip-tz-utc = true

# other extra args
#extra-args = "-B test -T t1,t2 --no-locks"


# Loader configuration

# Number of threads restoring concurrently for loader worker pool. Each worker restore one file at a time, increase this as TiKV nodes increase
pool-size = 16

# Syncer configuration

# different sub task should have different meta
# meta-file = "./syncer.subTaskA.meta"
[meta]
binlog-name = binlog-name-placeholder-1
binlog-pos = binlog-pos-placeholder-1

worker-count = 16
batch = 1000

# filter

# block allow list provides a library to filter replicate on schema/table by given rules
# support regular expression , start with '~' declare use regular expression.
# rules like replication rules in MySQL, ref document:
# https://dev.mysql.com/doc/refman/8.0/en/replication-rules-db-options.html
# https://dev.mysql.com/doc/refman/8.0/en/replication-rules-table-options.html
#[block-allow-list]
#do-dbs = ["~^b.*","s1"]
#
#ignore-dbs = ["~^b.*","s1"]
#
#[[block-allow-list.do-tables]]
#db-name = "your db"
#tbl-name = "your table"
#
#[[block-allow-list.ignore-tables]]
#db-name = "~^b.*"
#tbl-name = "~^a.*"


# filter-rules filter binlog events
#[[filter-rules]]
#schema-pattern = "shard_db_*"
#table-pattern  = "shard_table_*"
# do all dml, ignore all ddl
#events = ["all dml"]
#action = "Do"

#[[filter-rules]]
#schema-pattern = "shard_db_*"
#table-pattern  = "shard_table_*"
# ignore delete sqls and drop table ddls
#events = ["delete", "drop table"]
# regular expression, ignore drop procedure queries
# sql-pattern = ["^DROP\\s+PROCEDURE"]
#action = "Ignore"


# route table

# applied after filter
# our Selector is a two level selector (schemal level, and table level)
# [[route-rules]]
# schema-pattern = "shard_db_*"
# target-schema = "shard_db"
# [[route-rules]]
# schema-pattern = "shard_db_*"
# table-pattern = "shard_table_*"
# target-schema = "shard_db"
# target-table = "shard_table"

[from]
host = "127.0.0.1"
user = "root"
password = "123456"
port = 3306
# to: the target db
# from: the source db, not in this file, auto get it from worker's config
[to]
host = "127.0.0.1"
user = "test"
password = "123456"
port = 4000
