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 |
||
---|---|---|
.. | ||
point | ||
range | ||
lock_manager.cc | ||
lock_manager.h | ||
lock_tracker.h |