# diff Configuration.

log-level = "debug"

# for example, the whole data is [1...100]
# we can split these data to [1...10], [11...20], ..., [91...100]
# the [1...10] is a chunk, and it's chunk size is 10
# size of the split chunk
chunk-size = 1000

# how many goroutines are created to check data
# before #412, sync-diff-inspector will SetMaxOpenConns to 1, so processing 2 shard tables in upstream will block
check-thread-count = 1

# sampling check percent, for example 10 means only check 10% data
sample-percent = 100

# calculate the data's checksum, and compare data by checksum.
use-checksum = true

# the name of the file which saves sqls used to fix different data
fix-sql-file = "/tmp/tidb_tools_test/sync_diff_inspector/fix.sql"

# tables need to check.
[[check-tables]]
# schema name in target database.
schema = "diff_test"

# table list which need check in target database. 
# in sharding mode, you must set config for every table in table-config, otherwise will not check the table.
tables = ["test"]


# schema and table in check-tables must be contained in check-tables.
# a example for sharding tables.
[[table-config]]
# target schema name.
schema = "diff_test"

# target table name.
table = "test"

# set true if comparing sharding tables with target table
is-sharding = true

# source tables.
[[table-config.source-tables]]
instance-id = "source-1"
schema = "diff_test"
table  = "shard_test1"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "diff_test"
table  = "shard_test2"


[[source-db]]
host = "127.0.0.1"
port = 4001
user = "root"
password = ""
instance-id = "source-1"

[target-db]
host = "127.0.0.1"
port = 4000
user = "root"
password = ""
instance-id = "target-1"