版本:5.0.3
早上出现cdc同步异常提示,Error 8021: inconsistent extra index PRIMARY, handle 14 not found in table
日志里面咩有体现库表信息,这要怎么处理?
求解。
查询官网该错误为:
当向 TiKV 读取的 key 不存在时将出现该错误,该错误用于内部使用,对外表现为读到的结果为空。
[2021/11/27 10:18:14.506 +08:00] [INFO] [client.go:868] [“start new request”] [request="{“header”:{“cluster_id”:6964287679291523214,“ticdc_version”:“5.0.3”},“region_id”:8802582,“region_epoch”:{“conf_ver”:77,“version”:18127},“checkpoint_ts”:429386496464650249,“start_key”:“dIAAAAAAAKf/K19ygAAAAAD/AhcxAAAAAAD6”,“end_key”:“dIAAAAAAAKf/K19ygAAAAAD/A7wfAAAAAAD6”,“request_id”:120049,“extra_op”:1,“Request”:null}"] [addr=172.19.16.199:20160]
[2021/11/27 10:18:14.553 +08:00] [INFO] [client.go:1355] [“region state entry will be replaced because received message of newer requestID”] [regionID=8827863] [oldRequestID=117315] [requestID=120047] [addr=172.19.16.199:20160]
[2021/11/27 10:18:14.605 +08:00] [INFO] [region_range_lock.go:370] [“unlocked range”] [lockID=4226] [regionID=9127449] [startKey=74800000000000c1ff095f720000000000fa] [endKey=74800000000000c1ff095f730000000000fa] [checkpointTs=429386495940362258]
[2021/11/27 10:18:14.605 +08:00] [INFO] [region_cache.go:958] [“switch region peer to next due to NotLeader with NULL leader”] [currIdx=1] [regionID=9127449]
[2021/11/27 10:18:14.605 +08:00] [INFO] [region_range_lock.go:218] [“range locked”] [lockID=4226] [regionID=9127449] [startKey=74800000000000c1ff095f720000000000fa] [endKey=74800000000000c1ff095f730000000000fa] [checkpointTs=429386495940362258]
[2021/11/27 10:18:14.605 +08:00] [INFO] [client.go:868] [“start new request”] [request="{“header”:{“cluster_id”:6964287679291523214,“ticdc_version”:“5.0.3”},“region_id”:9127449,“region_epoch”:{“conf_ver”:119,“version”:21489},“checkpoint_ts”:429386495940362258,“start_key”:“dIAAAAAAAMH/CV9yAAAAAAD6”,“end_key”:“dIAAAAAAAMH/CV9zAAAAAAD6”,“request_id”:120050,“extra_op”:1,“Request”:null}"] [addr=172.19.16.199:20160]
[2021/11/27 10:18:14.705 +08:00] [INFO] [region_range_lock.go:370] [“unlocked range”] [lockID=4255] [regionID=9127449] [startKey=74800000000000c1ff445f720000000000fa] [endKey=74800000000000c1ff445f728000000000ff0afd650000000000fa] [checkpointTs=429386495940362258]
[2021/11/27 10:18:14.705 +08:00] [INFO] [region_cache.go:958] [“switch region peer to next due to NotLeader with NULL leader”] [currIdx=1] [regionID=9127449]
[2021/11/27 10:18:14.705 +08:00] [INFO] [region_range_lock.go:218] [“range locked”] [lockID=4255] [regionID=9127449] [startKey=74800000000000c1ff445f720000000000fa] [endKey=74800000000000c1ff445f728000000000ff0afd650000000000fa] [checkpointTs=429386495940362258]
[2021/11/27 10:18:14.705 +08:00] [INFO] [client.go:868] [“start new request”] [request="{“header”:{“cluster_id”:6964287679291523214,“ticdc_version”:“5.0.3”},“region_id”:9127449,“region_epoch”:{“conf_ver”:119,“version”:21489},“checkpoint_ts”:429386495940362258,“start_key”:“dIAAAAAAAMH/RF9yAAAAAAD6”,“end_key”:“dIAAAAAAAMH/RF9ygAAAAAD/Cv1lAAAAAAD6”,“request_id”:120051,“extra_op”:1,“Request”:null}"] [addr=172.19.16.199:20160]
[2021/11/27 10:18:14.802 +08:00] [ERROR] [processor.go:1399] [“error on running processor”] [capture=172.19.16.189:8300] [changefeed=hk-to-idc-tidb] [processor=52dc1fd5-75a4-43dd-a095-3171dc2b3da1] [error="[CDC:ErrMySQLTxnError]Error 8021: inconsistent extra index PRIMARY, handle 14 not found in table"] [errorVerbose="[CDC:ErrMySQLTxnError]Error 8021: inconsistent extra index PRIMARY, handle 14 not found in table\ngithub.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:28\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2.3\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:905\
github.com/pingcap/ticdc/cdc/sink.(*Statistics).RecordBatchExecution\
\tgithub.com/pingcap/ticdc@/cdc/sink/statistics.go:99\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:893\
github.com/pingcap/ticdc/pkg/retry.Run.func1\
\tgithub.com/pingcap/ticdc@/pkg/retry/retry.go:32\
github.com/cenkalti/backoff.RetryNotify\
\tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:37\
github.com/cenkalti/backoff.Retry\
\tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:24\
github.com/pingcap/ticdc/pkg/retry.Run\
\tgithub.com/pingcap/ticdc@/pkg/retry/retry.go:31\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:885\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLs\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:1044\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run.func3\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:799\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:837\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).createSinkWorkers.func1\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:640\
runtime.goexit\
\truntime/asm_amd64.s:1357"]
[2021/11/27 10:18:14.905 +08:00] [INFO] [region_range_lock.go:370] [“unlocked range”] [lockID=3686] [regionID=9127449] [startKey=74800000000000c0ffd55f720000000000fa] [endKey=74800000000000c0ffd55f730000000000fa] [checkpointTs=429386495940362258]
[2021/11/27 10:18:14.905 +08:00] [INFO] [region_cache.go:958] [“switch region peer to next due to NotLeader with NULL leader”] [currIdx=1] [regionID=9127449]
[2021/11/27 10:18:14.905 +08:00] [INFO] [region_range_lock.go:218] [“range locked”] [lockID=3686] [regionID=9127449] [startKey=74800000000000c0ffd55f720000000000fa] [endKey=74800000000000c0ffd55f730000000000fa] [checkpointTs=429386495940362258]
[2021/11/27 10:18:14.905 +08:00] [INFO] [client.go:868] [“start new request”] [request="{“header”:{“cluster_id”:6964287679291523214,“ticdc_version”:“5.0.3”},“region_id”:9127449,“region_epoch”:{“conf_ver”:119,“version”:21489},“checkpoint_ts”:429386495940362258,“start_key”:“dIAAAAAAAMD/1V9yAAAAAAD6”,“end_key”:“dIAAAAAAAMD/1V9zAAAAAAD6”,“request_id”:120052,“extra_op”:1,“Request”:null}"] [addr=172.19.16.199:20160]
[2021/11/27 10:18:14.918 +08:00] [INFO] [owner.go:1065] [“handle admin job”] [changefeed=hk-to-idc-tidb] [type=“stop changefeed”]
[2021/11/27 10:18:14.963 +08:00] [INFO] [processor.go:1302] [“stop processor”] [id=52dc1fd5-75a4-43dd-a095-3171dc2b3da1] [capture=172.19.16.189:8300] [changefeed=hk-to-idc-tidb]
[2021/11/27 10:18:14.965 +08:00] [ERROR] [processor.go:1437] [“processor receives redundant error”] [error="[CDC:ErrAdminStopProcessor]stop processor by admin command"] [errorVerbose="[CDC:ErrAdminStopProcessor]stop processor by admin command\ngithub.com/pingcap/errors.AddStack\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\
github.com/pingcap/errors.(*Error).GenWithStackByArgs\
\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:156\
github.com/pingcap/ticdc/cdc.(*oldProcessor).stop\
\tgithub.com/pingcap/ticdc@/cdc/processor.go:1321\
github.com/pingcap/ticdc/cdc.(*Capture).handleTaskEvent\
\tgithub.com/pingcap/ticdc@/cdc/capture.go:284\
github.com/pingcap/ticdc/cdc.(*Capture).Run\
\tgithub.com/pingcap/ticdc@/cdc/capture.go:212\
github.com/pingcap/ticdc/cdc.(*Server).run.func3\
\tgithub.com/pingcap/ticdc@/cdc/server.go:320\
golang.org/x/sync/errgroup.(*Group).Go.func1\
\tgolang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9/errgroup/errgroup.go:57\
runtime.goexit\
\truntime/asm_amd64.s:1357"]
[2021/11/27 10:18:15.011 +08:00] [INFO] [client.go:1236] [“stream to store closed”] [addr=172.19.16.199:20160] [storeID=3248593]
[2021/11/27 10:18:15.036 +08:00] [INFO] [client.go:1236] [“stream to store closed”] [addr=172.19.16.199:20160] [storeID=3248593]
[2021/11/27 10:18:15.052 +08:00] [WARN] [mysql.go:882] [“execute DMLs with error, retry later”] [error="[CDC:ErrMySQLTxnError]sql: database is closed"] [errorVerbose="[CDC:ErrMySQLTxnError]sql: database is closed\ngithub.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:28\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2.3\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:896\
github.com/pingcap/ticdc/cdc/sink.(*Statistics).RecordBatchExecution\
\tgithub.com/pingcap/ticdc@/cdc/sink/statistics.go:99\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:893\
github.com/pingcap/ticdc/pkg/retry.Run.func1\
\tgithub.com/pingcap/ticdc@/pkg/retry/retry.go:32\
github.com/cenkalti/backoff.RetryNotify\
\tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:37\
github.com/cenkalti/backoff.Retry\
\tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:24\
github.com/pingcap/ticdc/pkg/retry.Run\
\tgithub.com/pingcap/ticdc@/pkg/retry/retry.go:31\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:885\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLs\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:1044\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run.func3\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:799\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:837\
github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).createSinkWorkers.func1\
\tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:640\
runtime.goexit\
\truntime/asm_amd64.s:1357"]