为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:
【 TiDB 使用环境】
【概述】 场景 + 问题概述
有没有类似mysql的show binlog events命令查看binlog的位点,对应的表名称
【备份和数据迁移策略逻辑】
【背景】 做过哪些操作
【现象】 业务和数据库现象
【问题】 当前遇到的问题
[2021/12/20 10:57:38.133 +08:00] [INFO] [syncer.go:257] [“write save point”] [ts=429866498161901589]
[2021/12/20 10:57:38.133 +08:00] [ERROR] [syncer.go:457] [“Failed to close syncer”] [error=“Error 1062: Duplicate entry ‘693153969355’ for key ‘PRIMARY’”] [errorVerbose=“Error 1062: Duplicate entry ‘693153969355’ for key ‘PRIMARY’\ngithub.com/pingcap/errors.AddStack\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/errors.go:174\
github.com/pingcap/errors.Trace\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/juju_adaptor.go:15\
github.com/pingcap/tidb-binlog/pkg/loader.(*tx).commit\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:128\ngithub.com/pingcap/tidb-binlog/pkg/loader.(*executor).singleExec\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:382\ngithub.com/pingcap/tidb-binlog/pkg/loader.(*executor).singleExecRetry.func1\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:308\ngithub.com/pingcap/tidb-binlog/pkg/util.RetryContext\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/util/util.go:177\
github.com/pingcap/tidb-binlog/pkg/loader.(*executor).singleExecRetry\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:307\ngithub.com/pingcap/tidb-binlog/pkg/loader.(*loaderImpl).execByHash.func1\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/load.go:434\ngolang.org/x/sync/errgroup.(*Group).Go.func1\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/pkg/mod/golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:57\
runtime.goexit\
\t/usr/local/go/src/runtime/asm_amd64.s:1357”]
[2021/12/20 10:57:38.157 +08:00] [INFO] [syncer.go:249] [“handleSuccess quit”]
[2021/12/20 10:57:38.157 +08:00] [ERROR] [server.go:289] [“syncer exited abnormal”] [error=“add to dsyncer, commit ts 429866515293011979: Error 1062: Duplicate entry ‘693153969355’ for key ‘PRIMARY’”] [errorVerbose=“Error 1062: Duplicate entry ‘693153969355’ for key ‘PRIMARY’\ngithub.com/pingcap/errors.AddStack\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/errors.go:174\
github.com/pingcap/errors.Trace\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/juju_adaptor.go:15\
github.com/pingcap/tidb-binlog/pkg/loader.(*tx).commit\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:128\ngithub.com/pingcap/tidb-binlog/pkg/loader.(*executor).singleExec\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:382\ngithub.com/pingcap/tidb-binlog/pkg/loader.(*executor).singleExecRetry.func1\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:308\ngithub.com/pingcap/tidb-binlog/pkg/util.RetryContext\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/util/util.go:177\
github.com/pingcap/tidb-binlog/pkg/loader.(*executor).singleExecRetry\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/executor.go:307\ngithub.com/pingcap/tidb-binlog/pkg/loader.(*loaderImpl).execByHash.func1\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/src/github.com/pingcap/tidb-binlog/pkg/loader/load.go:434\ngolang.org/x/sync/errgroup.(*Group).Go.func1\
\t/home/jenkins/agent/workspace/build_tidb_binlog_master/go/pkg/mod/golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:57\
runtime.goexit\
\t/usr/local/go/src/runtime/asm_amd64.s:1357\
add to dsyncer, commit ts 429866515293011979”]
[2021/12/20 10:57:38.157 +08:00] [INFO] [util.go:72] [Exit] [name=syncer]
[2021/12/20 10:57:38.157 +08:00] [INFO] [server.go:451] [“begin to close drainer server”]
不知道重复主键的表名称,怎么处理?跳过位点,或者找到这条数据删掉?
【业务影响】
【TiDB 版本】 tidb4.0
【附件】
- 相关日志、配置文件、Grafana 监控(https://metricstool.pingcap.com/)
- TiUP Cluster Display 信息
- TiUP CLuster Edit config 信息
- TiDB-Overview 监控
- 对应模块的 Grafana 监控(如有 BR、TiDB-binlog、TiCDC 等)
- 对应模块日志(包含问题前后 1 小时日志)
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。