Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: Error: KV error safe to retry Txn(Mvcc(TxnLockNotFound
[TiDB Usage Environment] Production Environment
[TiDB Version] 5.7.25-TiDB-v4.0.16
[Reproduction Path] Operations performed that led to the issue
[Encountered Issue: Phenomenon and Impact] Today, after removing the unique index from the table and adding a normal index with the same corresponding field, the following error occurred during this period:
Caused by: java.sql.SQLException: Error: KV error safe to retry Txn(Mvcc(TxnLockNotFound { start_ts: TimeStamp(447121564147908611), commit_ts: TimeStamp(447121565655236609)
, key: [116, 128, 0, 0, 0, 0, 0, 6, 99, 95, 105, 128, 0, 0, 0, 0, 0, 0, 1, 1, 100, 101, 52, 50, 53, 99, 50, 52, 255, 97, 52, 101, 56, 100, 57, 55, 100, 255, 52, 55, 56, 52,
54, 97, 51, 99, 255, 100, 48, 97, 53, 100, 53, 98, 98, 255, 0, 0, 0, 0, 0, 0, 0, 0, 247] })) {tableID=1635, indexID=1, indexValues={de425c24a4e8d97d47846a3cd0a5d5bb, }} [t
ry again later]
TiDB adds indexes asynchronously. Does adding an index affect data writing, or is there another reason?
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]