ticdc 日志中一直刷[owner.go:268] ["add a table"]

tidbv5.1.1
背景: 将tidb 中的数据使用mydumper 导出后再导入到mysql 中,使用ticdc 进行增量同步
tidb —> tidcdc — mysql

1.ticdc 创建同步任务

#tiup ctl:v5.1.1 cdc changefeed create  --pd=http://172.29.xxx.xxx:2407 --sink-uri="mysql://xxxxx:xxxxxx@10.33.xxx.xxx:3432/?worker-count=16&max-txn-row=5000" 
--changefeed-id="bw-data" --start-ts=426808378119684102   
--sort-engine="unified"  --config  /home/tidb/config/bwdata.toml

more bwdata.toml
case-sensitive = true
# 是否输出 old value,从 v4.0.5 开始支持
enable-old-value = true
force-replicate = true

[filter]
ignore-txn-start-ts = [1, 2]

rules = ['bw_data.*','heartbeat.*']

[mounter]
worker-num = 8  #mounter 线程数,用于解码TiKV输出的数据

2.启动任务后ticdc 状态如下:checkpoint 不动

[
  {
    "id": "bw-data",
    "summary": {
      "state": "normal",
      "tso": 426808378119684102,
      "checkpoint": "2021-08-05 14:25:52.959",
      "error": null
    }
  }
]

3.ticdc 日志如下

- owner 先是一直刷日志
[2021/08/06 11:39:09.898 +08:00] [INFO] [owner.go:268] 
["add a table"] [tableId=2739] [boundaryTs=426808378119684102]

-  然后出现报错信息,owner 节点退出
[2021/08/06 11:39:11.194 +08:00] [INFO] [capture.go:242] ["run owner exited"] [error="etcdserver: request is too large"] [errorVerbose="etcdserver: request is too large\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\
github.com/pingcap/errors.Trace\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/juju_adaptor.go:15\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatches\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:282\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatchGroups\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:235\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).Run\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:146\
github.com/pingcap/ticdc/cdc/capture.(*Capture).runEtcdWorker\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:261\
github.com/pingcap/ticdc/cdc/capture.(*Capture).campaignOwner\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:240\
github.com/pingcap/ticdc/cdc/capture.(*Capture).run.func2\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:169\
runtime.goexit\
\truntime/asm_amd64.s:1371"]
[2021/08/06 11:39:11.195 +08:00] [INFO] [capture.go:170] ["the owner routine has exited"] [error="etcdserver: request is too large"] [errorVerbose="etcdserver: request is too large\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\
github.com/pingcap/errors.Trace\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/juju_adaptor.go:15\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatches\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:282\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatchGroups\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:235\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).Run\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:146\
github.com/pingcap/ticdc/cdc/capture.(*Capture).runEtcdWorker\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:261\
github.com/pingcap/ticdc/cdc/capture.(*Capture).campaignOwner\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:240\
github.com/pingcap/ticdc/cdc/capture.(*Capture).run.func2\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:169\
runtime.goexit\
\truntime/asm_amd64.s:1371"]
[2021/08/06 11:39:11.195 +08:00] [INFO] [capture.go:181] ["the processor routine has exited"] [error="[CDC:ErrPDEtcdAPIError]context canceled"] [errorVerbose="[CDC:ErrPDEtcdAPIError]context canceled\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\
github.com/pingcap/errors.(*Error).GenWithStackByCause\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:279\
github.com/pingcap/ticdc/pkg/errors.WrapError\
\tgithub.com/pingcap/ticdc/pkg/errors/helper.go:30\
github.com/pingcap/ticdc/cdc/capture.(*Capture).runEtcdWorker\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:275\
github.com/pingcap/ticdc/cdc/capture.(*Capture).run.func3\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:180\
runtime.goexit\
\truntime/asm_amd64.s:1371"]
[2021/08/06 11:39:11.196 +08:00] [INFO] [capture.go:138] ["the capture routine has exited"]
[2021/08/06 11:39:11.196 +08:00] [INFO] [client.go:510] ["[pd] exit tso dispatcher"] [dc-location=global]
[2021/08/06 11:39:11.196 +08:00] [ERROR] [server.go:132] ["run server"] [error="etcdserver: request is too large\
github.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\
github.com/pingcap/errors.Trace\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/juju_adaptor.go:15\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatches\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:282\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatchGroups\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:235\
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).Run\
\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:146\
github.com/pingcap/ticdc/cdc/capture.(*Capture).runEtcdWorker\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:261\
github.com/pingcap/ticdc/cdc/capture.(*Capture).campaignOwner\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:240\
github.com/pingcap/ticdc/cdc/capture.(*Capture).run.func2\
\tgithub.com/pingcap/ticdc/cdc/capture/capture.go:169\
runtime.goexit\
\truntime/asm_amd64.s:1371\
owner exited with error"]
[2021/08/06 11:39:11.196 +08:00] [INFO] [client.go:510] ["[pd] exit tso dispatcher"] [dc-location=global]
[2021/08/06 11:39:26.318 +08:00] [INFO] [util.go:99] ["init log"] [file=/data/tidb/deploy/cdc-8304/log/cdc.log] [level=info]
[2021/08/06 11:39:26.318 +08:00] [INFO] [version.go:47] ["Welcome to Change Data Capture (CDC)"] [release-version=v5.1.1] [git-hash=5a4568bc03df272d3f74e0c26fecf721e4745f90] [git-branch=heads/refs/tags/v5.1.1] [utc-build-time="2021-07-28 10:58:06"] [go-version="go version go1.16.4 linux/amd64"] [failpoint-build=false]
[2021/08/06 11:39:26.318 +08:00] [INFO] [server.go:74] ["creating CDC server"] [pd-addrs="[http://172.29.238.201:2407,http://172.29.238.147:2407,http://172.29.238.241:2407]"] [config="{\"addr\":\"0.0.0.0:8304\",\"advertise-addr\":\"172.29.230.39:8304\",\"log-file\":\"/data/tidb/deploy/cdc-8304/log/cdc.log\",\"log-level\":\"info\",\"log\":{\"file\":{\"max-size\":300,\"max-days\":0,\"max-backups\":0}},\"data-dir\":\"/data/tidb/data/cdc-8304\",\"gc-ttl\":86400,\"tz\":\"System\",\"capture-session-ttl\":10,\"owner-flush-interval\":200000000,\"processor-flush-interval\":100000000,\"sorter\":{\"num-concurrent-worker\":4,\"chunk-size-limit\":134217728,\"max-memory-percentage\":30,\"max-memory-consumption\":17179869184,\"num-workerpool-goroutine\":16,\"sort-dir\":\"/tmp/sorter\"},\"security\":{\"ca-path\":\"\",\"cert-path\":\"\",\"key-path\":\"\",\"cert-allowed-cn\":null},\"per-table-memory-quota\":20971520,\"kv-client\":{\"worker-concurrent\":8,\"worker-pool-size\":0,\"region-scan-limit\":40}}"]
[2021/08/06 11:39:26.318 +08:00] [INFO] [client.go:214] ["[pd] create pd client with endpoints"] [pd-address="[http://172.29.238.201:2407,http://172.29.238.147:2407,http://172.29.238.241:2407]"]
[2021/08/06 11:39:26.321 +08:00] [INFO] [base_client.go:334] ["[pd] update member urls"] [old-urls="[http://172.29.238.201:2407,http://172.29.238.147:2407,http://172.29.238.241:2407]"] [new-urls="[http://172.29.238.147:2407,http://172.29.238.201:2407,http://172.29.238.241:2407]"]
[2021/08/06 11:39:26.321 +08:00] [INFO] [base_client.go:346] ["[pd] switch leader"] [new-leader=http://172.29.238.241:2407] [old-leader=]
[2021/08/06 11:39:26.321 +08:00] [INFO] [base_client.go:126] ["[pd] init cluster id"] [cluster-id=6992156801476386023]
[2021/08/06 11:39:26.321 +08:00] [INFO] [client.go:238] ["[pd] create tso dispatcher"] [dc-location=global]
[2021/08/06 11:39:26.323 +08:00] [INFO] [server.go:378] ["/data/tidb/data/cdc-8304 is set as data-dir (6621GB available), sort-dir=/data/tidb/data/cdc-8304/tmp/sorter. It is recommended that the disk for data-dir at least have 500GB available space"]
[2021/08/06 11:39:26.325 +08:00] [INFO] [store.go:68] ["new store"] [path="tikv://172.29.238.147:2407,172.29.238.201:2407,172.29.238.241:2407?disableGC=true"]
[2021/08/06 11:39:26.325 +08:00] [INFO] [http_status.go:81] ["status http server is running"] [addr=0.0.0.0:8304]
[2021/08/06 11:39:26.325 +08:00] [INFO] [client.go:214] ["[pd] create pd client with endpoints"] [pd-address="[172.29.238.147:2407,172.29.238.201:2407,172.29.238.241:2407]"]
[2021/08/06 11:39:26.327 +08:00] [INFO] [base_client.go:346] ["[pd] switch leader"] [new-leader=http://172.29.238.241:2407] [old-leader=]
[2021/08/06 11:39:26.327 +08:00] [INFO] [base_client.go:126] ["[pd] init cluster id"] [cluster-id=6992156801476386023]
[2021/08/06 11:39:26.327 +08:00] [INFO] [client.go:238] ["[pd] create tso dispatcher"] [dc-location=global]
[2021/08/06 11:39:26.328 +08:00] [INFO] [store.go:74] ["new store with retry success"]
[2021/08/06 11:39:26.330 +08:00] [INFO] [capture.go:100] ["init capture"] [capture-id=28f1de7b-7611-417a-aee5-0d9d4773ab7e] [capture-addr=172.29.230.39:8304]
[2021/08/06 11:39:26.333 +08:00] [INFO] [reactor_state.go:74] ["remote capture online"] [capture-id=28f1de7b-7611-417a-aee5-0d9d4773ab7e] [info="{\"id\":\"28f1de7b-7611-417a-aee5-0d9d4773ab7e\",\"address\":\"172.29.230.39:8304\",\"version\":\"v5.1.1\"}"]
[2021/08/06 11:39:26.333 +08:00] [INFO] [reactor_state.go:74] ["remote capture online"] [capture-id=42c9f076-06ae-4045-8368-26dc28296fe0] [info="{\"id\":\"42c9f076-06ae-4045-8368-26dc28296fe0\",\"address\":\"172.29.230.63:8304\",\"version\":\"v5.1.1\"}"]
[2021/08/06 11:39:26.333 +08:00] [INFO] [reactor_state.go:74] ["remote capture online"] [capture-id=5be722c9-2294-4f9b-adb4-cabb602cdf32] [info="{\"id\":\"5be722c9-2294-4f9b-adb4-cabb602cdf32\",\"address\":\"172.29.230.82:8304\",\"version\":\"v5.1.1\"}"]

请问这种情况是什么原因 ?

1 个赞
error="etcdserver: request is too large"

主要是这个错误

应该是我要同步的表数量太多了。一共一万多。已反馈官方的老师进行确认了
我重新创建了两个表的同步,就正常了

当 changefeed 同步的表的数量非常大的情况下,可能出现上面的报错,对应的 issue 如下:

https://github.com/pingcap/ticdc/issues/2083

1 个赞

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。