rocksdb/utilities/transactions/lock/point
akabcenell 3381e4d787 Change GetWaitingTxns() to return blocking lock on timeout (#13754)
Summary:
While a transaction is waiting on a lock, we can use GetWaitingTxns() to determine the transactionID of the blocking transaction and the contended key. However, this gets cleared when the lock times out, so if a client has widespread timeout errors, you need to catch a transaction 'in the act' before they actually hit the timeout in order to understand the contention pattern. This diff adds a new TransactionOptions variable enable_get_waiting_txn_after_timeout, which persists the lock contention information after timeout so it can be accessed by the client after they have received the timeout error.

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

Test Plan:
- updated TransactionTest.WaitingTxn to test the changed behavior
- ran production shadow tests on traffic with frequent timeouts

Reviewed By: cbi42

Differential Revision: D77703598

Pulled By: akabcenell

fbshipit-source-id: b4448ca1b6a3694d51bfe1ce801b09eb376ff3e9
2025-07-08 15:01:59 -07:00
..
point_lock_manager.cc Change GetWaitingTxns() to return blocking lock on timeout (#13754) 2025-07-08 15:01:59 -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