rocksdb/utilities/transactions/lock
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 Change GetWaitingTxns() to return blocking lock on timeout (#13754) 2025-07-08 15:01:59 -07:00
range Fix tests broken by gtest upgrade (#13661) 2025-06-04 10:44:17 -07:00
lock_manager.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
lock_manager.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
lock_tracker.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00