为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
- 【TiDB 版本】:4.0.1
- 【问题描述】:
enable-heartbeat: true
这个配置,在同步任务已经运行一段时间后,能否再加上去?
看文档
update-task update a task's config for routes, filters, or block-allow-list
貌似不能更新这个参数
为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
enable-heartbeat: true
这个配置,在同步任务已经运行一段时间后,能否再加上去?
看文档
update-task update a task's config for routes, filters, or block-allow-list
貌似不能更新这个参数
stop-task,start-task 即可。
query-status taskname 看下返回结果
» query-status task_smc
{
“result”: true,
“msg”: “”,
“workers”: [
{
“result”: true,
“worker”: “172.16.120.7:8264”,
“msg”: “”,
“subTaskStatus”: [
{
“name”: “task_smc”,
“stage”: “Running”,
“unit”: “Sync”,
“result”: null,
“unresolvedDDLLockID”: “”,
“sync”: {
“totalEvents”: “7337180”,
“totalTps”: “131”,
“recentTps”: “7”,
“masterBinlog”: “(mysql-bin.002461, 277526643)”,
“masterBinlogGtid”: “4c103bae-9378-11e9-a47b-7cd30a5a1e6c:1-114764751,7c3dd09a-60bf-11e9-99bc-506b4b477bbc:1-34205073,f1731f3e-9371-11e9-a452-702084e1f15a:1-3251”,
“syncerBinlog”: “(mysql-bin|000001.002461, 277403339)”,
“syncerBinlogGtid”: “”,
“blockingDDLs”: [
],
“unresolvedGroups”: [
],
“synced”: false
}
}
],
“relayStatus”: {
“masterBinlog”: “(mysql-bin.002461, 277526643)”,
“masterBinlogGtid”: “4c103bae-9378-11e9-a47b-7cd30a5a1e6c:1-114764751,7c3dd09a-60bf-11e9-99bc-506b4b477bbc:1-34205073,f1731f3e-9371-11e9-a452-702084e1f15a:1-3251”,
“relaySubDir”: “4c103bae-9378-11e9-a47b-7cd30a5a1e6c.000001”,
“relayBinlog”: “(mysql-bin.002461, 277526643)”,
“relayBinlogGtid”: “4c103bae-9378-11e9-a47b-7cd30a5a1e6c:1-114764751,7c3dd09a-60bf-11e9-99bc-506b4b477bbc:1-34205073,f1731f3e-9371-11e9-a452-702084e1f15a:1-3251”,
“relayCatchUpMaster”: true,
“stage”: “Running”,
“result”: null
},
“sourceID”: “mysql-replica-smc”
}
执行下 rolling_update_monitor.yml 试下
执行了,还是一样哦
如果开启 heartbeat 功能,需要上游 MySQL/MariaDB 实例提供下面的权限:
如果不 ok ,看下 dm-wroker log 辛苦上传下 welcome 之后得日志
dm-wroker 也需要重启吗,我之前只是重启了任务
如果权限确认,并且执行过 rolling_update_monitor ,可以尝试将 dm-worker 重启看下,
辛苦检查下上游有没有创建这个 dm_heartbeat 库
dm 版本是多少。
再确认下 grafana 中的时间区间是否正确。
dm v1.0.5
grafana 时间区间选择最佳5分钟 最近1小时 等都是这个结果
日志中,可以关注下
[2020/07/29 16:24:42.149 +08:00] [ERROR] [heartbeat.go:256] [“update heartbeat ts”] [component=heartbeat] [error="[code=10001:class=database:scope=upstream:level=high] database driver error: Error 1142: DELETE command denied to user ‘dm_worker’@‘172.16.120.7’ for table ‘heartbeat’"]
好吧 ,文档没有说需要这个权限,我明天试试