为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
- 【TiDB 版本】:
v4.0.6 - 【问题描述】:
[2020/09/28 14:51:06.127 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251053] [txn=419764860631384268] [forUpdateTS=419764860644491269] [err="[kv:9007]Write conflict, txnStartTS=419764860631384268, conflictStartTS=419764860631384232, conflictCommitTS=419764860644491323, key={tableID=4269, handle=121240} primary={tableID=4289, indexID=1, indexValues={170556951598516173, }} [try again later]"]
[2020/09/28 14:51:06.168 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251125] [txn=419764860644491416] [forUpdateTS=419764860644491449] [err="[kv:9007]Write conflict, txnStartTS=419764860644491416, conflictStartTS=419764860644491357, conflictCommitTS=419764860657598515, key={tableID=4269, handle=121214} primary={tableID=4289, indexID=1, indexValues={170556951665625037, }} [try again later]"]
[2020/09/28 14:51:06.188 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251246] [txn=419764860657598504] [forUpdateTS=419764860657598521] [err="[kv:9007]Write conflict, txnStartTS=419764860657598504, conflictStartTS=419764860644491460, conflictCommitTS=419764860657598602, key={tableID=4269, handle=151206} primary={tableID=4289, indexID=1, indexValues={170556951699179469, }} [try again later]"]
[2020/09/28 14:51:06.538 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251125] [txn=419764860736241878] [forUpdateTS=419764860749348885] [err="[kv:9007]Write conflict, txnStartTS=419764860736241878, conflictStartTS=419764860736241871, conflictCommitTS=419764860749348942, key={tableID=4269, handle=121168} primary={tableID=4289, indexID=1, indexValues={170556952269604813, }} [try again later]"]
[2020/09/28 14:51:06.772 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251151] [txn=419764860801777898] [forUpdateTS=419764860801777965] [err="[kv:9007]Write conflict, txnStartTS=419764860801777898, conflictStartTS=419764860801777810, conflictCommitTS=419764860814884932, key={tableID=4269, handle=121178} primary={tableID=4289, indexID=1, indexValues={170556952672257997, }} [try again later]"]
[2020/09/28 14:51:06.939 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251246] [txn=419764860854206543] [forUpdateTS=419764860854206564] [err="[kv:9007]Write conflict, txnStartTS=419764860854206543, conflictStartTS=419764860854206468, conflictCommitTS=419764860854206606, key={tableID=4269, handle=121294} primary={tableID=4289, indexID=1, indexValues={170556952957536205, }} [try again later]"]
[2020/09/28 14:51:07.008 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251053] [txn=419764860867313840] [forUpdateTS=419764860867313845] [err="[kv:9007]Write conflict, txnStartTS=419764860867313840, conflictStartTS=419764860867313784, conflictCommitTS=419764860867313866, key={tableID=4269, handle=121276} primary={tableID=4289, indexID=1, indexValues={170556953074911181, }} [try again later]"]
[2020/09/28 14:51:07.183 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251151] [txn=419764860906635543] [forUpdateTS=419764860919742516] [err="[kv:9007]Write conflict, txnStartTS=419764860906635543, conflictStartTS=419764860906635457, conflictCommitTS=419764860919742616, key={tableID=4269, handle=121188} primary={tableID=4289, indexID=1, indexValues={170556953343346637, }} [try again later]"]
[2020/09/28 14:51:08.270 +08:00] [INFO] [adapter.go:611] ["pessimistic write conflict, retry statement"] [conn=251151] [txn=419764861168779418] [forUpdateTS=419764861168779436] [err="[kv:9007]Write conflict, txnStartTS=419764861168779418, conflictStartTS=419764861168779307, conflictCommitTS=419764861208100873, key={tableID=4269, handle=151188} primary={tableID=4289, indexID=1, indexValues={170556954987513805, }} [try again later]"]
日志信息描述有点疑惑
key={tableID=4269, handle=121178} primary={tableID=4289, indexID=1, indexValues={170556952672257997, }}
从业务角度讲,可能是 tableId=4289
报错了,但为何有个提示 key={tableID=4269, handle=121178}
?
实际业务场景中,并不存在主键 170556952672257997
冲突的情况,查日志也没发现有重复的情况出现。
造成这部分的原因大概什么情况呢?(该表预计写入 qps [40,60), 几乎无查询)