Commit b7a4fc65 authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Use kSyncImportantUpdates policy in newly initialized clusters

parent 52531c46
Pipeline #1341706 passed with stages
in 84 minutes and 15 seconds
......@@ -141,7 +141,7 @@ void RaftJournal::initializeFsyncPolicy() {
FsyncPolicy tmp = FsyncPolicy::kSyncImportantUpdates;
if(!parseFsyncPolicy(policyStr, tmp)) {
qdb_warn("Invalid fsync policy in journal: " << policyStr);
qdb_critical("Invalid fsync policy in journal: " << policyStr);
}
fsyncPolicy = tmp;
......
......@@ -192,7 +192,7 @@ int main(int argc, char** argv) {
qdb_info("--nodes were not specified. This new node will be 'in limbo' until it is contacted by an existing cluster, and cannot be used to start a new cluster from scratch. Run 'quarkdb-add-observer' on the leader of the existing cluster to add it.");
}
shardDirectory.reset(quarkdb::ShardDirectory::create(optPath, optClusterID, "default", nodes, journalStartingIndex, quarkdb::FsyncPolicy::kAsync, std::move(stolenStateMachine), st));
shardDirectory.reset(quarkdb::ShardDirectory::create(optPath, optClusterID, "default", nodes, journalStartingIndex, quarkdb::FsyncPolicy::kSyncImportantUpdates, std::move(stolenStateMachine), st));
}
else {
shardDirectory.reset(quarkdb::ShardDirectory::create(optPath, "null", "default", std::move(stolenStateMachine), st));
......
......@@ -72,7 +72,7 @@ void createTestCluster(const std::string &optConfigurationDir, int port) {
std::unique_ptr<quarkdb::ShardDirectory> shardDirectory;
quarkdb::Status st;
shardDirectory.reset(quarkdb::ShardDirectory::create(dataDir, clusterID, "default", nodes, 0, FsyncPolicy::kAsync, {}, st));
shardDirectory.reset(quarkdb::ShardDirectory::create(dataDir, clusterID, "default", nodes, 0, FsyncPolicy::kSyncImportantUpdates, {}, st));
port++;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment