rocksdb/utilities/transactions
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
..
lock Change GetWaitingTxns() to return blocking lock on timeout (#13754) 2025-07-08 15:01:59 -07:00
optimistic_transaction.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
optimistic_transaction.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
optimistic_transaction_db_impl.cc Delete max_write_buffer_number_to_maintain (#13491) 2025-04-07 21:44:36 -07:00
optimistic_transaction_db_impl.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
optimistic_transaction_test.cc Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
pessimistic_transaction.cc Check op count in WBWI vs WB when ingesting WBWI (#13722) 2025-06-25 13:32:08 -07:00
pessimistic_transaction.h Change GetWaitingTxns() to return blocking lock on timeout (#13754) 2025-07-08 15:01:59 -07:00
pessimistic_transaction_db.cc Delete max_write_buffer_number_to_maintain (#13491) 2025-04-07 21:44:36 -07:00
pessimistic_transaction_db.h Make transaction name conflict check more robust (#12895) 2024-07-30 12:31:02 -07:00
snapshot_checker.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
timestamped_snapshot_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
transaction_base.cc Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
transaction_base.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
transaction_db_mutex_impl.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
transaction_db_mutex_impl.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
transaction_test.cc Change GetWaitingTxns() to return blocking lock on timeout (#13754) 2025-07-08 15:01:59 -07:00
transaction_test.h Deprecate raw DB pointer in public APIs (#13311) 2025-01-17 13:33:25 -08:00
transaction_util.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
transaction_util.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
write_committed_transaction_ts_test.cc Fix write committed transactions replay when UDT setting toggles (#13121) 2024-11-06 17:32:03 -08:00
write_prepared_transaction_test.cc Delete max_write_buffer_number_to_maintain (#13491) 2025-04-07 21:44:36 -07:00
write_prepared_txn.cc Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
write_prepared_txn.h Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
write_prepared_txn_db.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
write_prepared_txn_db.h Properly disable MultiCFIterator in WritePrepared/UnPreparedTxnDBs (#12883) 2024-07-24 16:50:12 -07:00
write_unprepared_transaction_test.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
write_unprepared_txn.cc Refactor wal related naming and more (#13490) 2025-04-11 10:08:29 -07:00
write_unprepared_txn.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
write_unprepared_txn_db.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
write_unprepared_txn_db.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00