业务连接使用连接池, tidb 使用负载均衡器
tidb 日志:
[2019/11/13 03:06:55.153 +00:00] [ERROR] [ddl_worker.go:141] ["[ddl] handle DDL job failed"] [worker=“worker 1, tp general”] [error="[kv:9007]Write conflict, txnStartTS=412513577152282627, conflictStartTS=412513577139175425, conflictCommitTS=412513577192128513, key=[]byte{0x6d, 0x44, 0x44, 0x4c, 0x4a, 0x6f, 0x62, 0x4c, 0x69, 0xff, 0x73, 0x74, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4c} primary=[]byte{0x6d, 0x44, 0x44, 0x4c, 0x4a, 0x6f, 0x62, 0x48, 0x69, 0xff, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x48} [try again later]"] [stack="![](file:///C:UsersAdministratorAppDataRoamingTencentTIMTemp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb/ddl.(*worker).start
/home/jenkins/workspace/release_tidb_3.0/go/src/![](file:///C:UsersAdministratorAppDataRoamingTencentTIMTemp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb/ddl/ddl_worker.go:141![](file:///C:UsersAdministratorAppDataRoamingTencentTIMTemp%W@GJ$ACOF(TYDYECOKVDYB.png)ngithub.com/pingcap/tidb/ddl.(*ddl).start.func1
/home/jenkins/workspace/release_tidb_3.0/go/src/![](file:///C:UsersAdministratorAppDataRoamingTencentTIMTemp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb/ddl/ddl.go:445![](file:///C:UsersAdministratorAppDataRoamingTencentTIMTemp%W@GJ$ACOF(TYDYECOKVDYB.png)ngithub.com/pingcap/tidb/util.WithRecovery
/home/jenkins/workspace/release_tidb_3.0/go/src/![](file:///C:UsersAdministratorAppDataRoamingTencentTIMTemp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb/util/misc.go:81"]
[2019/11/13 03:06:55.216 +00:00] [INFO] [ddl_worker.go:657] ["[ddl] wait latest schema version changed"] [worker=“worker 1, tp general”] [ver=230239] [“take time”=56.227903ms] [job=“ID:294385, Type:truncate table, State:done, SchemaState:public, SchemaID:17438, TableID:294046, RowCount:0, ArgLen:0, start time: 2019-11-13 03:06:33.596 +0000 UTC, Err:, ErrCount:0, SnapshotVersion:0”]
[2019/11/13 03:06:55.216 +00:00] [INFO] [ddl_worker.go:624] ["[ddl] schema version doesn’t change"] [worker=“worker 1, tp general”]
[2019/11/13 03:06:55.704 +00:00] [INFO] [2pc.go:880] [“2PC clean up done”] [txnStartTS=412513577152282627]
[2019/11/13 03:07:37.808 +00:00] [ERROR] [ddl_worker.go:141] ["[ddl] handle DDL job failed"] [worker=“worker 1, tp general”] [error="[kv:9007]Write conflict, txnStartTS=412513588306509841, conflictStartTS=412513588293402625, conflictCommitTS=412513588398260231, key=[]byte{0x6d, 0x44, 0x44, 0x4c, 0x4a, 0x6f, 0x62, 0x4c, 0x69, 0xff, 0x73, 0x74, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4c} primary=[]byte{0x6d, 0x44, 0x44, 0x4c, 0x4a, 0x6f, 0x62, 0x48, 0x69, 0xff, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x48} [try again later]"] [stack=“github.com/pingcap/tidb/ddl.(*worker).start
/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/ddl/ddl_worker.go:141ngithub.com/pingcap/tidb/ddl.(*ddl).start.func1
/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/ddl/ddl.go:445ngithub.com/pingcap/tidb/util.WithRecovery
/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/util/misc.go:81”]
[2019/11/13 03:07:37.866 +00:00] [INFO] [ddl_worker.go:657] ["[ddl] wait latest schema version changed"] [worker=“worker 1, tp general”] [ver=230252] [“take time”=53.407182ms] [job=“ID:294449, Type:truncate table, State:done, SchemaState:public, SchemaID:15308, TableID:293961, RowCount:0, ArgLen:0, start time: 2019-11-13 03:07:19.846 +0000 UTC, Err:, ErrCount:0, SnapshotVersion:0”]
TIkv 日志:
[2019/11/13 03:08:06.666 +00:00] [ERROR] [endpoint.rs:454] [error-response] [err=“locked primary_lock: 7480000000000441A75F69800000000000000103800000005DCB63A00380000000002D88D003800000000000002F038000000000257AA6 lock_version: 412513593051316230 key: 7480000000000441A75F69800000000000000103800000005DCB63A00380000000002D892103800000000000002F0380000000002572B4 lock_ttl: 16159 txn_size: 298”]