Increase transaction timeout and enable deadlock detection in stress test (#7056)
Summary: There are errors like `Transaction put: Operation timed out: Timeout waiting to lock key terminate called without an active exception`, based on experiment on devserver, increasing timeouts can resolve the issue. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7056 Test Plan: watch stress test with txn. Reviewed By: anand1976 Differential Revision: D22317265 Pulled By: cheng-chang fbshipit-source-id: 2dc3352def5e78d2c39a18d7262a3a65ca98bbba
This commit is contained in:
parent
80b107a0a9
commit
f045ee6422
@ -463,6 +463,8 @@ Status StressTest::NewTxn(WriteOptions& write_opts, Transaction** txn) {
|
||||
}
|
||||
static std::atomic<uint64_t> txn_id = {0};
|
||||
TransactionOptions txn_options;
|
||||
txn_options.lock_timeout = 60000; // 1min
|
||||
txn_options.deadlock_detect = true;
|
||||
*txn = txn_db_->BeginTransaction(write_opts, txn_options);
|
||||
auto istr = std::to_string(txn_id.fetch_add(1));
|
||||
Status s = (*txn)->SetName("xid" + istr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user