rocksdb/utilities/transactions/lock/point
Changyu Bi 0e3e349369 Fix an infinite-loop bug in transaction locking (#13585)
Summary:
when a transaction reaches lock limit and times out before it attempts to wait for it (9d1a071194/utilities/transactions/lock/point/point_lock_manager.cc (L320)), it can busy-loop forever even though its timeout is expired. This PR fixes this bug by setting a timeout status when its timeout is reached.

This PR also updates the `LockLimit` status from `Busy` to `Aborted`, this matches the check in `Status::IsLockLimit()` and matches the customer usage (c6e4b9f3f9/storage/rocksdb/ha_rocksdb.cc (L10745-L10746)).

Pull Request resolved: https://github.com/facebook/rocksdb/pull/13585

Test Plan: added a unit test that would infinite-loop before this fix.

Reviewed By: jaykorean

Differential Revision: D74077824

Pulled By: cbi42

fbshipit-source-id: 4993d4e4c71bb1594835e9ec6ff4a74d453a9190
2025-05-12 15:42:25 -07:00
..
point_lock_manager.cc Fix an infinite-loop bug in transaction locking (#13585) 2025-05-12 15:42:25 -07:00
point_lock_manager.h Fix an infinite-loop bug in transaction locking (#13585) 2025-05-12 15:42:25 -07:00
point_lock_manager_test.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
point_lock_manager_test.h Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
point_lock_tracker.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
point_lock_tracker.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00