From d68cb9b04872a505a2bfa4782f8a4e7e83c2efd3 Mon Sep 17 00:00:00 2001 From: Josh Slocum Date: Tue, 25 May 2021 20:06:32 +0000 Subject: [PATCH] Changing role names and enabling tss by default in consistency check --- fdbserver/SimulatedCluster.actor.cpp | 12 ++++-------- fdbserver/worker.actor.cpp | 4 ++-- fdbserver/workloads/ConsistencyCheck.actor.cpp | 2 +- flow/ProtocolVersion.h | 1 - 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/fdbserver/SimulatedCluster.actor.cpp b/fdbserver/SimulatedCluster.actor.cpp index 70fed849d9..1747047d85 100644 --- a/fdbserver/SimulatedCluster.actor.cpp +++ b/fdbserver/SimulatedCluster.actor.cpp @@ -186,7 +186,7 @@ public: bool configureLocked = false; bool startIncompatibleProcess = false; int logAntiQuorum = -1; - bool firstTestInRestart = false; + bool isFirstTestInRestart = false; // Storage Engine Types: Verify match with SimulationConfig::generateNormalConfig // 0 = "ssd" // 1 = "memory" @@ -1171,7 +1171,7 @@ void SimulationConfig::generateNormalConfig(const TestConfig& testConfig) { } int tssCount = 0; - if (!testconfig.simpleConfig && deterministicRandom()->random01() < 0.25) { + if (!testConfig.simpleConfig && deterministicRandom()->random01() < 0.25) { // 1 or 2 tss tssCount = deterministicRandom()->randomInt(1, 3); } @@ -1189,14 +1189,10 @@ void SimulationConfig::generateNormalConfig(const TestConfig& testConfig) { db.grvProxyCount = 1; db.resolverCount = 1; } + int replication_type = testConfig.simpleConfig ? 1 : (std::max(testConfig.minimumReplication, datacenters > 4 ? deterministicRandom()->randomInt(1, 3) : std::min(deterministicRandom()->randomInt(0, 6), 3))); if (testConfig.config.present()) { set_config(testConfig.config.get()); } else { - int replication_type = testConfig.simpleConfig - ? 1 - : (std::max(testConfig.minimumReplication, - datacenters > 4 ? deterministicRandom()->randomInt(1, 3) - : std::min(deterministicRandom()->randomInt(0, 6), 3))); switch (replication_type) { case 0: { TEST(true); // Simulated cluster using custom redundancy mode @@ -1513,7 +1509,7 @@ void SimulationConfig::generateNormalConfig(const TestConfig& testConfig) { tssCount = std::max(0, std::min(tssCount, (db.usableRegions * (machine_count / datacenters) - replication_type) / 2)); - if (tssCount > 0) { + if (!testConfig.config.present() && tssCount > 0) { std::string confStr = format("tss_count:=%d tss_storage_engine:=%d", tssCount, db.storageServerStoreType); set_config(confStr); double tssRandom = deterministicRandom()->random01(); diff --git a/fdbserver/worker.actor.cpp b/fdbserver/worker.actor.cpp index 11b90dbae5..d48b9cd628 100644 --- a/fdbserver/worker.actor.cpp +++ b/fdbserver/worker.actor.cpp @@ -2151,7 +2151,7 @@ ACTOR Future fdbd(Reference connFile, const Role Role::WORKER("Worker", "WK", false); const Role Role::STORAGE_SERVER("StorageServer", "SS"); -const Role Role::TESTING_STORAGE_SERVER("TestingStorageServer", "TS"); +const Role Role::TESTING_STORAGE_SERVER("TestingStorageServer", "ST"); const Role Role::TRANSACTION_LOG("TLog", "TL"); const Role Role::SHARED_TRANSACTION_LOG("SharedTLog", "SL", false); const Role Role::COMMIT_PROXY("CommitProxyServer", "CP"); @@ -2159,7 +2159,7 @@ const Role Role::GRV_PROXY("GrvProxyServer", "GP"); const Role Role::MASTER("MasterServer", "MS"); const Role Role::RESOLVER("Resolver", "RV"); const Role Role::CLUSTER_CONTROLLER("ClusterController", "CC"); -const Role Role::TESTER("TestClient", "TC"); +const Role Role::TESTER("Tester", "TS"); const Role Role::LOG_ROUTER("LogRouter", "LR"); const Role Role::DATA_DISTRIBUTOR("DataDistributor", "DD"); const Role Role::RATEKEEPER("Ratekeeper", "RK"); diff --git a/fdbserver/workloads/ConsistencyCheck.actor.cpp b/fdbserver/workloads/ConsistencyCheck.actor.cpp index 3b5156fb1e..459501198e 100644 --- a/fdbserver/workloads/ConsistencyCheck.actor.cpp +++ b/fdbserver/workloads/ConsistencyCheck.actor.cpp @@ -97,7 +97,7 @@ struct ConsistencyCheckWorkload : TestWorkload { ConsistencyCheckWorkload(WorkloadContext const& wcx) : TestWorkload(wcx) { performQuiescentChecks = getOption(options, LiteralStringRef("performQuiescentChecks"), false); performCacheCheck = getOption(options, LiteralStringRef("performCacheCheck"), false); - performTSSCheck = getOption(options, LiteralStringRef("performTSSCheck"), false); + performTSSCheck = getOption(options, LiteralStringRef("performTSSCheck"), true); quiescentWaitTimeout = getOption(options, LiteralStringRef("quiescentWaitTimeout"), 600.0); distributed = getOption(options, LiteralStringRef("distributed"), true); shardSampleFactor = std::max(getOption(options, LiteralStringRef("shardSampleFactor"), 1), 1); diff --git a/flow/ProtocolVersion.h b/flow/ProtocolVersion.h index 7feb6b3839..af7c6f1108 100644 --- a/flow/ProtocolVersion.h +++ b/flow/ProtocolVersion.h @@ -138,7 +138,6 @@ public: // introduced features PROTOCOL_VERSION_FEATURE(0x0FDB00B070010000LL, StableInterfaces); PROTOCOL_VERSION_FEATURE(0x0FDB00B070010001LL, TagThrottleValueReason); PROTOCOL_VERSION_FEATURE(0x0FDB00B070010001LL, SpanContext); - // TODO is this right? PROTOCOL_VERSION_FEATURE(0x0FDB00B070010001LL, TSS); };