为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
- 【TiDB 版本】:3.0
- 【问题描述】: 2个yaml文件,进行2个不同名称的作业将上游mysql的joytime-erp库,同步至下游tidm的joytime-erp库和test0111库,原有的task正常,新增了一个task_test0111。
现在同步到test0111库的task_test0111已经启动正常,可totalEvents一直 是0,就是说任务看似启动了,其实没有同步数据。
下面是query-status
[tidb@i-maoh9wf3 bin]$ ./dmctl -master-addr 10.39.49.5:8261 query-status task_qhdtest210111
{
“result”: true,
“msg”: “”,
“workers”: [
{
“result”: true,
“worker”: “10.39.49.5:8263”,
“msg”: “”,
“subTaskStatus”: [
{
“name”: “task_qhdtest210111”,
“stage”: “Running”,
“unit”: “Sync”,
“result”: null,
“unresolvedDDLLockID”: “”,
“sync”: {
“totalEvents”: “0”,
“totalTps”: “0”,
“recentTps”: “0”,
“masterBinlog”: “(mysql-bin.000036, 70563535)”,
“masterBinlogGtid”: “”,
“syncerBinlog”: “(mysql-bin|000001.000036, 70558214)”,
“syncerBinlogGtid”: “”,
“blockingDDLs”: [
],
“unresolvedGroups”: [
],
“synced”: false
}
}
],
“relayStatus”: {
“masterBinlog”: “(mysql-bin.000036, 70563535)”,
“masterBinlogGtid”: “”,
“relaySubDir”: “c1ed5e25-6c37-11ea-a23e-00163e0bfe49.000001”,
“relayBinlog”: “(mysql-bin.000036, 70563535)”,
“relayBinlogGtid”: “”,
“relayCatchUpMaster”: true,
“stage”: “Running”,
“result”: null
},
“sourceID”: “mysql-replica-02”
}
]
}
下面是新task设置
task_qhd210111.yaml (1.6 KB)
name: task_qhdtest210111 # global unique
task-mode: all # full/incremental/all
target-database:
host: “10.1.50.80”
port: 4000
user: “dm”
password: “NiU2SLoENJoxgXS+h2rWsUDQdbEQFcnOLQ4dgII=”
mysql-instances: # one or more source database, config more source database for sharding merge
source-id: "mysql-replica-02"
black-white-list: "instance"
# number of threads to use for dump data
mydumper-thread: 4
# number of threads to use for load data
loader-thread: 16
# number of threads to use for replicate binlog
syncer-thread: 16
syncer-config-name: "global"
route-rules: ["route-rule-1"]
filter-rules: ["filter-rule-1"]
filters: # 上游数据库实例匹配的表的 binlog event filter 规则集
filter-rule-1: # 配置名称
schema-pattern: “joytime-erp” # 库名匹配规则,支持通配符 “" 和 “?”
table-pattern: "”
events: [“truncate table”, “drop table”, “delete”]
action: Ignore
routes:
route-rule-1:
schema-pattern: “joytime-erp”
target-schema: “test0111”
black-white-list:
instance:
do-dbs: [“joytime-erp”] # white list of upstream schemas needs to be replicated, regular expression (starts with ~) is supported
do-tables: # white list of upstream tables needs to be replicated, (db-name, tbl-name) regular expression (starts with ~) is supported
- db-name: “joytime-erp”
tbl-name: “~.*”
syncers:
global:
worker-count: 64
batch: 5000
max-retry: 100
enable-heartbeat: true
请各位大咖给分析一下。谢谢
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。