Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: Error(Txn(Error(Mvcc(Error(PessimisticLockNotFound
To improve efficiency, please provide the following information. A clear problem description can help resolve the issue faster:
【TiDB Usage Environment】Research
【TiDB Version】V5.4.2
【Encountered Problem】
2022-08-30T06:08:27.122217166Z [v1] [2022-08-30T14:08:27.120+0800] [error] [main] index [TID:N/A] uncaughtException|err: QueryFailedError: tikv aborts txn: Error(Txn(Error(Mvcc(Error(PessimisticLockNotFound { start_ts: TimeStamp(435641308093362171), key: [116, 128, 0, 0, 0, 0, 0, 1, 74, 95, 105, 128, 0, 0, 0, 0, 0, 0, 1, 1, 70, 89, 81, 48, 48, 48, 48, 48, 255, 48, 48, 48, 49, 51, 51, 52, 50, 255, 55, 0, 0, 0, 0, 0, 0, 0, 248, 1, 112, 101, 114, 102, 84, 101, 115, 116, 255, 0, 0, 0, 0, 0, 0, 0, 0, 247, 1, 107, 90, 121, 86, 72, 97, 98, 49, 255, 117, 99, 0, 0, 0, 0, 0, 0, 249, 1, 99, 114, 101, 97, 116, 101, 0, 0, 253, 3, 64, 0, 0, 0, 186, 103, 6, 162] })))))
【Reproduction Path】What operations were performed to encounter the problem
【Problem Phenomenon and Impact】
Currently, we are conducting performance testing for the business. It was running fine for several consecutive days, but this issue suddenly appeared yesterday. This morning, I checked and found that the issue disappeared again after 2 AM. The current observation is that only delete statements encounter this problem, and the transaction model used is the default pessimistic transaction.
| Variable_name | Value |
±--------------±------------+
| tidb_txn_mode | pessimistic |
±--------------±------------+
[FAQ] tikv aborts txn: Txn(Mvcc(PessimisticLockNotFound - TiDB 的问答社区 This post also does not mention the cause and solution to the problem.