Disable fsync in SeqAdvanceConcurrentTest (#7302)
Summary: SeqAdvanceConcurrentTest sometimes runs too long on some platforms. Disable fsync to speed it up. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7302 Test Plan: Run the tests and watch CI. Reviewed By: ajkr Differential Revision: D23298192 fbshipit-source-id: 2185eed4e0958c3de5e8a3f94ceed5be5945ed37
This commit is contained in:
parent
21ce018a32
commit
5aacef9712
@ -12,6 +12,7 @@
|
||||
#include <thread>
|
||||
|
||||
#include "db/db_impl/db_impl.h"
|
||||
#include "db/db_test_util.h"
|
||||
#include "port/port.h"
|
||||
#include "rocksdb/db.h"
|
||||
#include "rocksdb/options.h"
|
||||
@ -40,6 +41,7 @@ enum WriteOrdering : bool { kOrderedWrite, kUnorderedWrite };
|
||||
class TransactionTestBase : public ::testing::Test {
|
||||
public:
|
||||
TransactionDB* db;
|
||||
SpecialEnv special_env;
|
||||
FaultInjectionTestEnv* env;
|
||||
std::string dbname;
|
||||
Options options;
|
||||
@ -50,14 +52,17 @@ class TransactionTestBase : public ::testing::Test {
|
||||
TransactionTestBase(bool use_stackable_db, bool two_write_queue,
|
||||
TxnDBWritePolicy write_policy,
|
||||
WriteOrdering write_ordering)
|
||||
: db(nullptr), env(nullptr), use_stackable_db_(use_stackable_db) {
|
||||
: db(nullptr),
|
||||
special_env(Env::Default()),
|
||||
env(nullptr),
|
||||
use_stackable_db_(use_stackable_db) {
|
||||
options.create_if_missing = true;
|
||||
options.max_write_buffer_number = 2;
|
||||
options.write_buffer_size = 4 * 1024;
|
||||
options.unordered_write = write_ordering == kUnorderedWrite;
|
||||
options.level0_file_num_compaction_trigger = 2;
|
||||
options.merge_operator = MergeOperators::CreateFromStringId("stringappend");
|
||||
env = new FaultInjectionTestEnv(Env::Default());
|
||||
env = new FaultInjectionTestEnv(&special_env);
|
||||
options.env = env;
|
||||
options.two_write_queues = two_write_queue;
|
||||
dbname = test::PerThreadDBPath("transaction_testdb");
|
||||
|
@ -573,7 +573,9 @@ class SeqAdvanceConcurrentTest
|
||||
std::get<0>(GetParam()), std::get<1>(GetParam()),
|
||||
std::get<2>(GetParam()), std::get<3>(GetParam())),
|
||||
split_id_(std::get<4>(GetParam())),
|
||||
split_cnt_(std::get<5>(GetParam())){};
|
||||
split_cnt_(std::get<5>(GetParam())) {
|
||||
special_env.skip_fsync_ = true;
|
||||
};
|
||||
|
||||
protected:
|
||||
// A test is split into split_cnt_ tests, each identified with split_id_ where
|
||||
|
Loading…
x
Reference in New Issue
Block a user