-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy pathconfig_sharding.toml
More file actions
101 lines (78 loc) · 3 KB
/
config_sharding.toml
File metadata and controls
101 lines (78 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Diff Configuration.
######################### Global config #########################
# how many goroutines are created to check data
check-thread-count = 4
# set false if just want compare data by checksum, will skip select data when checksum is not equal.
# set true if want compare all different rows, will slow down the total compare time.
export-fix-sql = true
# ignore check table's data
check-struct-only = false
######################### Databases config #########################
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
route-rules = ["rule1", "rule2"]
# remove comment if use tidb's snapshot data
# snapshot = "2016-10-08 16:45:26"
[data-sources.mysql2]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
route-rules = ["rule1", "rule2"]
# remove comment if use tidb's snapshot data
# snapshot = "2016-10-08 16:45:26"
[data-sources.mysql3]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
route-rules = ["rule1", "rule3"]
# remove comment if use tidb's snapshot data
# snapshot = "2016-10-08 16:45:26"
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
password = ""
session.tidb_opt_prefer_range_scan = "ON"
session.max_execution_time = 86400
# remove comment if use tidb's snapshot data
# snapshot = "2016-10-08 16:45:26"
[routes.rule1]
schema-pattern = "test_*" # schema to match. Support wildcard characters * and ?.
table-pattern = "t_*" # table to match. Support wildcard characters * and ?.
target-schema = "test" # target schema
target-table = "t" # target table
[routes.rule2]
schema-pattern = "test2_*" # schema to match. Support wildcard characters * and ?.
table-pattern = "t2_*" # table to match. Support wildcard characters * and ?.
target-schema = "test2" # target schema
target-table = "t2" # target table
[routes.rule3]
schema-pattern = "test2_*" # schema to match. Support wildcard characters * and ?.
table-pattern = "t2_*" # table to match. Support wildcard characters * and ?.
target-schema = "test" # target schema
target-table = "t" # target table
######################### Task config #########################
[task]
# 1 fix sql: fix-target-TIDB1.sql
# 2 log: sync-diff.log
# 3 summary: summary.txt
# 4 checkpoint: a dir
output-dir = "/tmp/output/config"
source-instances = ["mysql1", "mysql2", "mysql3"]
target-instance = "tidb0"
# tables need to check. *Include `schema` and `table`. Use `.` to split*
target-check-tables = ["schema*.table*", "!c.*", "test2.t2"]
# extra table config
target-configs= ["config1"]
[table-configs.config1]
# tables need to use this specified config.
# if use this config. target-tables should be a subset of #target-check-tables
target-tables = ["schema*.table*", "test2.t2"]
range = "age > 10 AND age < 20"
index-fields = [""]
ignore-columns = ["",""]