- 【TiDB 版本】:v4.0.8
- 【问题描述】:golang 程序压测tidb 出现异常
在docker 中使用golang 100并发 压测tidb ,批量写入数据
偶尔出现以下报错:
{“level”:“ERROR”,“time”:“2021-01-20 17:54:19”,“file”:“service/devicerecord.go:76”,“msg”:“BatchInsert Failed:device record batch insert error: db insert error: driver: bad connection”,“logId”:“3789006240”,“requestId”:“3789013727”,“module”:“gocrius”,“localIp”:“192.168.240.239”,“uri”:""}
在tidb 日志中会有如下warn 出现:
[2021/01/20 17:45:27.151 +08:00] [WARN] [session.go:686] [“transaction association”] [conn=297930] [“retrying txnStartTS”=422349616234103758] [“original txnStartTS”=422349616103032055]
[2021/01/20 17:45:27.177 +08:00] [WARN] [client_batch.go:632] [“wait response is cancelled”] [to=172.29.238.134:20160] [cause=“context canceled”]
[2021/01/20 17:45:27.177 +08:00] [WARN] [session.go:462] [sql] [conn=298059] [label=general] [error="[kv:9007]Write conflict, txnStartTS=422349616470032731, conflictStartTS=422349616470032675, conflictCommitTS=4223496164700
32823, key={tableID=308182, handle=7493989779946307838} primary={tableID=308182, handle=1152921504608649724} [try again later]"] [txn=“Txn{state=invalid}”]
[2021/01/20 17:57:07.234 +08:00] [WARN] [session.go:487] [“commit failed”] [“finished txn”=“Txn{state=invalid}”] [error="[domain:8028]Information schema is changed during the execution of the statement(for example, table definition may be updated by other DDL ran in parallel). If you see this error often, try increasing tidb_max_delta_schema_count
. [try again later]"]
请问上述的warn 是否会导致程序端的 连接失败的报错 ?