Tidb version: V4.0.9
Mysql version:V5.7
log:
[2022/01/27 15:40:54.442 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5064]
[2022/01/27 15:40:54.442 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5080]
[2022/01/27 15:40:56.356 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5070]
[2022/01/27 15:40:56.608 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5064]
[2022/01/27 15:40:56.786 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5062]
[2022/01/27 15:40:56.912 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5078]
[2022/01/27 15:40:57.282 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:57.390 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:57.516 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:57.692 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5072]
[2022/01/27 15:40:57.921 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:58.300 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:58.495 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5076]
[2022/01/27 15:40:58.523 +08:00] [INFO] [syncer.go:581] [“skip old version truncate dml”] [“table id”=5072]
能把 drainer 的配置和启动参数发出来看一下吗?
启动:
bin/drainer --node-id=192.168.1.161:8249 --addr=192.168.1.161:8249 --pd-urls=http://192.168.1.62:2379,http://192.168.1.63:2379,http://192.168.1.64:2379 --data-dir=/TiDB/tidb-data/drainer-8249 --log-file=/TiDB/tidb-deploy/drainer-8249/log/drainer.log --config=conf/drainer.toml --initial-commit-ts=0
配置:
[syncer]
txn-batch = 100
worker-count = 2
db-type = “mysql”
safe-mode = true
sql-mode = “”
ignore-schemas=“INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,qd_api,zhy,dm_meta,METRICS_SCHEMA,test,visualization,tidb_loader”
[[syncer.replicate-do-table]]
db-name =“xxxxx”
tbl-name = “A,B,C”
[syncer.to]
host = “192.168.1.163”
user = “root”
password = “xxxxxx”
port = xxxxx
是只做增量?第一次全量同步过了?
只增量
initial-commit-ts第一次要初始化为meta里的,这一步之前做过了?
没呢 不能只导表结构然后只增量数据吗?
增量要告诉drainer从哪个ts开始
initial-commit-ts=0 他不是会从pd里面自动获取当前时间字段吗?
我从tidb_binlog库中的checkpoint表中可以看到这个:
6835963828825374381 {“consistent”:false,“commitTS”:430772144948903937,“ts-map”:{}}
需要指定initial-commit-ts=430772144948903937 ?
要到你导出数据目录的metadata里取
先停掉drainer,把下游的checkpoint数据清掉,配置initial-commit-ts后再启动drainer
我们使用pump+drainer 同步给mysql的 没有dumpling拉数据
要先做一次全量同步,再做增量
我们是用的dumpling+lightning
lightning是针对导入Tidb的 我的下游是Mysql哦
那找下对应工具吧,我们下游是tidb
请问有什么问题吗
好的谢谢
没用dumpling+lightling导入到mysql过,应该是可以,可以查一下
还未解决 大佬有知道的麻烦给个思路哈~
这个问题看起来在新贴中解决了,是syncer配置问题导致的。
此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。