From e5a4dacf6d8aee5499d21b3e348615055eb9d3c1 Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Thu, 26 Apr 2018 09:14:28 -0700 Subject: [PATCH] WritePrepared Txn: disable rollback in stress test Summary: WritePrepared rollback implementation is not ready to be invoked in the middle of workload. This is due the lack of synchronization to obtain the cf handle from db. Temporarily disabling this until the problem with rollback is fixed. Closes https://github.com/facebook/rocksdb/pull/3772 Differential Revision: D7769041 Pulled By: maysamyabandeh fbshipit-source-id: 0e3b0ce679bc2afba82e653a40afa3f045722754 --- util/transaction_test_util.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/transaction_test_util.cc b/util/transaction_test_util.cc index 3f8eea6de..bc6f512a6 100644 --- a/util/transaction_test_util.cc +++ b/util/transaction_test_util.cc @@ -184,7 +184,9 @@ bool RandomTransactionInserter::DoInsert(DB* db, Transaction* txn, s = txn->Prepare(); assert(s.ok()); } - if (!rand_->OneIn(20)) { + // TODO(myabandeh): enable this when WritePreparedTxnDB::RollbackPrepared + // is updated to handle in-the-middle rollbacks. + if (!rand_->OneIn(0)) { s = txn->Commit(); } else { // Also try 5% rollback