Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 写入Lock cf中的锁信息数据(加锁、删锁)是怎么清理或过期的呢?
How is the lock information data (locking, deleting locks) written in the Lock cf cleaned up or expired?
Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 写入Lock cf中的锁信息数据(加锁、删锁)是怎么清理或过期的呢?
How is the lock information data (locking, deleting locks) written in the Lock cf cleaned up or expired?
When locking, there is a TTL (Time To Live). The TiDB instance that initiates the transaction will maintain this TTL to prevent it from expiring. If the transaction terminates abnormally, the TTL will expire because it is not maintained. During a snapshot read, if it is found that the lock’s TTL has expired, the transaction will be rolled back and the lock will be cleaned up. Additionally, during the GC (Garbage Collection) Resolve Locks phase, regions will be scanned to clean up expired locks.
This topic will be automatically closed 60 days after the last reply. No new replies are allowed.