dm同步主键冲突如何查看那个表的主键冲突

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:3.0.5
  • 【问题描述】: dm同步主键冲突如何查看那个表的主键冲突
    日志和界面报错信息均无打印具体表信息
query-status test_tidb
{
    "result": true,
    "msg": "",
    "workers": [
        {
            "result": true,
            "worker": "192.168.10.101:8265",
            "msg": "",
            "subTaskStatus": [
                {
                    "name": "test_tidb",
                    "stage": "Paused",
                    "unit": "Sync",
                    "result": {
                        "isCanceled": false,
                        "errors": [
                            {
                                "Type": "ExecSQL",
                                "msg": "Error 1292: invalid time format: '1'\ngithub.com/pingcap/errors.AddStack\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.4/errors.go:174\ngithub.com/pingcap/errors.Trace\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.4/juju_adaptor.go:15\ngithub.com/pingcap/dm/syncer.(*Conn).executeSQLJobImp\n\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/db.go:237\ngithub.com/pingcap/dm/syncer.(*Conn).executeSQLJob\n\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/db.go:196\ngithub.com/pingcap/dm/syncer.(*Syncer).sync.func3\n\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:850\ngithub.com/pingcap/dm/syncer.(*Syncer).sync\n\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:935\ngithub.com/pingcap/dm/syncer.(*Syncer).Run.func2\n\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:1013\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"
                            }
                        ],
                        "detail": null
                    },
                    "unresolvedDDLLockID": "",
                    "sync": {
                        "totalEvents": "2498486",
                        "totalTps": "793",
                        "recentTps": "0",
                        "masterBinlog": "(db1m-bin.000046, 820805380)",
                        "masterBinlogGtid": "",
                        "syncerBinlog": "(db1m-bin|000001.000046, 798554517)",
                        "syncerBinlogGtid": "",
                        "blockingDDLs": [
                        ],
                        "unresolvedGroups": [
                        ],
                        "synced": false
                    }
                }
            ],
            "relayStatus": {
                "masterBinlog": "(db1m-bin.000046, 820805380)",
                "masterBinlogGtid": "",
                "relaySubDir": "07777bc0-9dd1-11e7-9d49-000c29652500.000001",
                "relayBinlog": "(db1m-bin.000046, 820805380)",
                "relayBinlogGtid": "",
                "relayCatchUpMaster": true,
                "stage": "Running",
                "result": null
            },
            "sourceID": "mysql4"
        }
    ]
}

dm-work.log

[2020/04/13 18:04:10.901 +08:00] [WARN] [syncer.go:571] ["something wrong with rollback global checkpoint"] [task=test_tidb] [unit="binlog replication"] ["previous position"="(db1m-bin|000001.000046, 798607937)"] ["current position"="(db1m-bin|000001.000046, 798555298)"]
[2020/04/13 18:04:10.902 +08:00] [INFO] [subtask.go:243] ["unit process returned"] [subtask=test_tidb] [unit=Sync] [stage=Paused] [status="{\"totalEvents\":2794208,\"totalTps\":793,\"masterBinlog\":\"(db1m-bin.000046, 823169177)\",\"syncerBinlog\":\"(db1m-bin|000001.000046, 798555298)\"}"]
[2020/04/13 18:04:10.902 +08:00] [ERROR] [subtask.go:262] ["unit process error"] [subtask=test_tidb] [unit=Sync] ["error information"="{\"Type\":1,\"msg\":\"Error 1292: invalid time format: '2'\\ngithub.com/pingcap/errors.AddStack\\n\\t/go/pkg/mod/github.com/pingcap/errors@v0.11.4/errors.go:174\\ngithub.com/pingcap/errors.Trace\\n\\t/go/pkg/mod/github.com/pingcap/errors@v0.11.4/juju_adaptor.go:15\\ngithub.com/pingcap/dm/syncer.(*Conn).executeSQLJobImp\\n\\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/db.go:237\\ngithub.com/pingcap/dm/syncer.(*Conn).executeSQLJob\\n\\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/db.go:196\\ngithub.com/pingcap/dm/syncer.(*Syncer).sync.func3\\n\\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:850\\ngithub.com/pingcap/dm/syncer.(*Syncer).sync\\n\\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:935\\ngithub.com/pingcap/dm/syncer.(*Syncer).Run.func2\\n\\t/home/jenkins/workspace/build_dm_master/go/src/github.com/pingcap/dm/syncer/syncer.go:1013\\nruntime.goexit\\n\\t/usr/local/go/src/runtime/asm_amd64.s:1337\"}"]

1.请问从什么信息上看出来是主键冲突的,请提供一下相关的信息及日志 2. “invalid time format” 从错误信息来看是时间字段有问题,可能是转换、格式的问题

一会主键冲突,一会个数错误。下次再出问题在看日志吧。
日志让我删了。。。

你好,

感谢回复,下次遇到问题可以将相关日志 copy 出来,以保留现场,便于排查。