forked from continuwuation/rocksdb
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 |
||
|---|---|---|
| .. | ||
| lock | ||
| optimistic_transaction.cc | ||
| optimistic_transaction.h | ||
| optimistic_transaction_db_impl.cc | ||
| optimistic_transaction_db_impl.h | ||
| optimistic_transaction_test.cc | ||
| pessimistic_transaction.cc | ||
| pessimistic_transaction.h | ||
| pessimistic_transaction_db.cc | ||
| pessimistic_transaction_db.h | ||
| snapshot_checker.cc | ||
| timestamped_snapshot_test.cc | ||
| transaction_base.cc | ||
| transaction_base.h | ||
| transaction_db_mutex_impl.cc | ||
| transaction_db_mutex_impl.h | ||
| transaction_test.cc | ||
| transaction_test.h | ||
| transaction_util.cc | ||
| transaction_util.h | ||
| write_committed_transaction_ts_test.cc | ||
| write_prepared_transaction_test.cc | ||
| write_prepared_txn.cc | ||
| write_prepared_txn.h | ||
| write_prepared_txn_db.cc | ||
| write_prepared_txn_db.h | ||
| write_unprepared_transaction_test.cc | ||
| write_unprepared_txn.cc | ||
| write_unprepared_txn.h | ||
| write_unprepared_txn_db.cc | ||
| write_unprepared_txn_db.h | ||