Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: ticdc 同步报错
【TiDB Environment】Production Environment
【TiDB Version】6.1.0
【Encountered Issue】The source TiDB 5.3.0 is synchronized to 6.1.0 via TiCDC. The synchronization task is established, but the target keeps reporting errors.
【Reproduction Path】
【Issue Phenomenon and Impact】
[2022/08/27 14:33:07.951 +08:00] [ERROR] [session.go:721] [“assertion failed”] [conn=633048217743437079] [message=“[tikv:8141]assertion failed: key: 7480000000000007695f698000000000000001010e2d0e290e290e2aff0f640e8b10510ec1ff0e330f5b0e8b0eb9ff0e4a1002105e0e30ff0e2a0e320e2e0e2eff0e2a0e2b0e2c0e29ff0e300e300e2d0e2cff0e2d0e2f0e2c0e2eff0e2e000000000000f9, assertion: Exist, start_ts: 435573748162101255, existing start ts: 0, existing commit ts: 0”] [“mvcc history”=“{"key":"7480000000000007695F698000000000000001010E2D0E290E290E2AFF0F640E8B10510EC1FF0E330F5B0E8B0EB9FF0E4A1002105E0E30FF0E2A0E320E2E0E2EFF0E2A0E2B0E2C0E29FF0E300E300E2D0E2CFF0E2D0E2F0E2C0E2EFF0E2E000000000000F9","mvcc":{"info":{"writes":[{"type":3,"start_ts":435573742696398855,"commit_ts":435573742696398855}]}},"regionID":425126}”]
[2022/08/27 14:33:07.951 +08:00] [WARN] [session.go:881] [“can not retry txn”] [conn=633048217743437079] [label=general] [error=“[tikv:8141]assertion failed: key: 7480000000000007695f698000000000000001010e2d0e290e290e2aff0f640e8b10510ec1ff0e330f5b0e8b0eb9ff0e4a1002105e0e30ff0e2a0e320e2e0e2eff0e2a0e2b0e2c0e29ff0e300e300e2d0e2cff0e2d0e2f0e2c0e2eff0e2e000000000000f9, assertion: Exist, start_ts: 435573748162101255, existing start ts: 0, existing commit ts: 0”] [IsBatchInsert=false] [IsPessimistic=false] [InRestrictedSQL=false] [tidb_retry_limit=10] [tidb_disable_txn_auto_retry=true]
[2022/08/27 14:33:07.951 +08:00] [WARN] [session.go:897] [“commit failed”] [conn=633048217743437079] [“finished txn”=“Txn{state=invalid}”] [error=“[tikv:8141]assertion failed: key: 7480000000000007695f698000000000000001010e2d0e290e290e2aff0f640e8b10510ec1ff0e330f5b0e8b0eb9ff0e4a1002105e0e30ff0e2a0e320e2e0e2eff0e2a0e2b0e2c0e29ff0e300e300e2d0e2cff0e2d0e2f0e2c0e2eff0e2e000000000000f9, assertion: Exist, start_ts: 435573748162101255, existing start ts: 0, existing commit ts: 0”]
[2022/08/27 14:33:07.951 +08:00] [WARN] [session.go:1941] [“run statement failed”] [conn=633048217743437079] [schemaVersion=889] [error=“previous statement: REPLACE INTO activity_flow_clean
.newgamesgcp
(id
,md5
,site_id
,member_id
,venue_id
,venue_bill_no
,bet_amount
,net_amount
,valid_bet_amount
,bet_time
,settle_time
,flag
,created_at
,updated_at
) VALUES (4228667934687145998,_binary’4001newgamesgcp220821301827168’,4001,292358,3,_binary’220821301827168’,‘311.0000’,‘-311.0000’,‘311.0000’,_binary’2022-08-27T13:23:04+08:00’,_binary’2022-08-27T13:23:04+08:00’,1,‘2022-08-27 13:24:10’,‘2022-08-27 13:24:10’),(4228667934853607502,_binary’4001newgamesgcp220821301827286’,4001,82145487,3,_binary’220821301827286’,‘101.0000’,‘-101.0000’,‘101.0000’,_binary’2022-08-27T13:24:04+08:00’,_binary’2022-08-27T13:24:04+08:00’,1,‘2022-08-27 13:24:10’,‘2022-08-27 13:24:10’): [tikv:8141]assertion failed: key: 7480000000000007695f698000000000000001010e2d0e290e290e2aff0f640e8b10510ec1ff0e330f5b0e8b0eb9ff0e4a1002105e0e30ff0e2a0e320e2e0e2eff0e2a0e2b0e2c0e29ff0e300e300e2d0e2cff0e2d0e2f0e2c0e2eff0e2e000000000000f9, assertion: Exist, start_ts: 435573748162101255, existing start ts: 0, existing commit ts: 0”] [session=“{
"currDBName": "",
"id": 633048217743437079,
"status": 2,
"strictMode": true,
"user": {
"Username": "dba_tools",
"Hostname": "10.10.11.109",
"CurrentUser": false,
"AuthUsername": "dba_tools",
"AuthHostname": "10.%"
}
}”]
[2022/08/27 14:33:07.951 +08:00] [INFO] [conn.go:1149] [“command dispatched failed”] [conn=633048217743437079] [connInfo=“id:633048217743437079, addr:10.10.11.109:60563 status:10, collation:utf8mb4_general_ci, user:dba_tools”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql=COMMIT] [txn_mode=OPTIMISTIC] [timestamp=435573748162101255] [err=“[tikv:8141]assertion failed: key: 7480000000000007695f698000000000000001010e2d0e290e290e2aff0f640e8b10510ec1ff0e330f5b0e8b0eb9ff0e4a1002105e0e30ff0e2a0e320e2e0e2eff0e2a0e2b0e2c0e29ff0e300e300e2d0e2cff0e2d0e2f0e2c0e2eff0e2e000000000000f9, assertion: Exist, start_ts: 435573748162101255, existing start ts: 0, existing commit ts: 0
github.com/pingcap/errors.AddStack
\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174
github.com/pingcap/errors.(*Error).GenWithStackByArgs
\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/normalize.go:164
github.com/pingcap/tidb/session.(*session).handleAssertionFailure
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:679
github.com/pingcap/tidb/session.(*session).doCommit
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:622
github.com/pingcap/tidb/session.(*session).doCommitWithRetry
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:861
github.com/pingcap/tidb/session.(*session).CommitTxn
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:927
github.com/pingcap/tidb/session.autoCommitAfterStmt
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:280
github.com/pingcap/tidb/session.finishStmt
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:246
github.com/pingcap/tidb/session.runStmt
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2080
github.com/pingcap/tidb/session.(*session).ExecuteStmt
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1938
github.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:230
github.com/pingcap/tidb/server.(*clientConn).handleStmt
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2022
github.com/pingcap/tidb/server.(*clientConn).handleQuery
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1876
github.com/pingcap/tidb/server.(*clientConn).dispatch
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1371
github.com/pingcap/tidb/server.(*clientConn).Run
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1121
github.com/pingcap/tidb/server.(*Server).onConn
\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:559
runtime.goexit
\t/usr/local/go/src/runtime/asm_amd64.s:1571
previous statement: REPLACE INTO activity_flow_clean
.newgamesgcp
(id
,md5
,site_id
,member_id
,venue_id
,venue_bill_no
,bet_amount
,net_amount
,valid_bet_amount
,bet_time
,settle_time
,flag
,created_at
,updated_at
) VALUES (4228667934687145998,_binary’4001newgamesgcp220821301827168’,4001,292358,3,_binary’220821301827168’,‘311.0000’,‘-311.0000’,‘311.0000’,_binary’2022-08-27T13:23:04+08:00’,_binary’2022-08-27T13:23:04+08:00’,1,‘2022-08-27 13:24:10’,‘2022-08-27 13:24:10’),(4228667934853607502,_binary’4001newgamesgcp220821301827286’,4001,82145487,3,_binary’220821301827286’,‘101.0000’,‘-101.0000’,‘101.0000’,_binary’2022-08-27T13:24:04+08:00’,_binary’2022-08-27T13:24:04+08:00’,1,‘2022-08-27 13:24:10’,‘2022-08-27 13:24:10’)”]
[2022/08/27 14:33:08.587 +08:00] [WARN] [2pc.go:1802] [“schemaLeaseChecker is not set for this transaction”] [sessionID=633048217743437121] [startTS=435573748830568450] [checkTS=435573748830568451]