diff --git a/fdbserver/ConsistencyScan.actor.cpp b/fdbserver/ConsistencyScan.actor.cpp index eac23f34329..2fc9adf0f3c 100644 --- a/fdbserver/ConsistencyScan.actor.cpp +++ b/fdbserver/ConsistencyScan.actor.cpp @@ -41,7 +41,7 @@ #include "fdbserver/RatekeeperInterface.h" #include "fdbserver/ServerDBInfo.h" #include "fdbserver/WaitFailure.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "flow/DeterministicRandom.h" #include "flow/Trace.h" #include "fdbserver/QuietDatabase.h" diff --git a/fdbserver/SimulatedCluster.actor.cpp b/fdbserver/SimulatedCluster.actor.cpp index 5610f8bcacd..4165326cf22 100644 --- a/fdbserver/SimulatedCluster.actor.cpp +++ b/fdbserver/SimulatedCluster.actor.cpp @@ -37,7 +37,7 @@ #include "fdbclient/ClusterConnectionFile.h" #include "fdbclient/ClusterConnectionMemoryRecord.h" #include "fdbclient/DatabaseContext.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbclient/ClusterInterface.h" #include "fdbserver/Knobs.h" diff --git a/fdbserver/fdbserver.actor.cpp b/fdbserver/fdbserver.actor.cpp index 8e2b2413f93..84845b8d5aa 100644 --- a/fdbserver/fdbserver.actor.cpp +++ b/fdbserver/fdbserver.actor.cpp @@ -67,7 +67,7 @@ #include "fdbserver/ServerDBInfo.h" #include "fdbserver/SimulatedCluster.h" #include "fdbserver/Status.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/pubsub.h" #include "fdbserver/OnDemandStore.h" diff --git a/fdbserver/include/fdbserver/QuietDatabase.h b/fdbserver/include/fdbserver/QuietDatabase.h index 2b059475614..a23cec7995c 100644 --- a/fdbserver/include/fdbserver/QuietDatabase.h +++ b/fdbserver/include/fdbserver/QuietDatabase.h @@ -25,7 +25,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/DatabaseContext.h" // for clone() #include "fdbclient/FDBTypes.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" Future getDataInFlight(Database const& cx, Reference const> const&); diff --git a/fdbserver/include/fdbserver/TesterInterface.actor.h b/fdbserver/include/fdbserver/TesterInterface.h similarity index 75% rename from fdbserver/include/fdbserver/TesterInterface.actor.h rename to fdbserver/include/fdbserver/TesterInterface.h index edfde02f71e..bc6d103fb21 100644 --- a/fdbserver/include/fdbserver/TesterInterface.actor.h +++ b/fdbserver/include/fdbserver/TesterInterface.h @@ -1,5 +1,5 @@ /* - * TesterInterface.actor.h + * TesterInterface.h * * This source file is part of the FoundationDB open source project * @@ -20,17 +20,14 @@ #pragma once -#if defined(NO_INTELLISENSE) && !defined(FDBSERVER_TESTERINTERFACE_ACTOR_G_H) -#define FDBSERVER_TESTERINTERFACE_ACTOR_G_H -#include "fdbserver/TesterInterface.actor.g.h" -#elif !defined(FDBSERVER_TESTERINTERFACE_ACTOR_H) -#define FDBSERVER_TESTERINTERFACE_ACTOR_H +#ifndef FDBSERVER_TESTERINTERFACE_H +#define FDBSERVER_TESTERINTERFACE_H #include "fdbrpc/fdbrpc.h" #include "fdbrpc/PerfMetric.h" #include "fdbclient/NativeAPI.actor.h" #include "flow/UnitTest.h" -#include "flow/actorcompiler.h" // has to be last include + struct CheckReply { constexpr static FileIdentifier file_identifier = 11; @@ -121,11 +118,11 @@ struct TesterInterface { } }; -ACTOR Future testerServerCore(TesterInterface interf, - Reference ccr, - Reference const> serverDBInfo, - LocalityData locality, - Optional expectedWorkLoad = Optional()); +Future testerServerCore(const TesterInterface& interf, + Reference ccr, + Reference const> serverDBInfo, + LocalityData locality, + Optional expectedWorkLoad = Optional()); enum test_location_t { TEST_HERE, TEST_ON_SERVERS, TEST_ON_TESTERS }; enum test_type_t { @@ -135,18 +132,17 @@ enum test_type_t { TEST_TYPE_CONSISTENCY_CHECK_URGENT }; -ACTOR Future runTests( - Reference connRecord, +Future runTests( + const Reference& connRecord, test_type_t whatToRun, test_location_t whereToRun, int minTestersExpected, - std::string fileName = std::string(), + const std::string& fileName = std::string(), StringRef startingConfiguration = StringRef(), - LocalityData locality = LocalityData(), - UnitTestParameters testOptions = UnitTestParameters(), - Optional defaultTenant = Optional(), - Standalone> tenantsToCreate = Standalone>(), + const LocalityData& locality = LocalityData(), + const UnitTestParameters& testOptions = UnitTestParameters(), + const Optional& defaultTenant = Optional(), + const Standalone>& tenantsToCreate = Standalone>(), bool restartingTest = false); -#include "flow/unactorcompiler.h" -#endif +#endif // FDBSERVER_TESTERINTERFACE_H diff --git a/fdbserver/include/fdbserver/WorkerInterface.actor.h b/fdbserver/include/fdbserver/WorkerInterface.actor.h index a9a1bfd005c..a1704c23d70 100644 --- a/fdbserver/include/fdbserver/WorkerInterface.actor.h +++ b/fdbserver/include/fdbserver/WorkerInterface.actor.h @@ -38,7 +38,7 @@ #include "fdbclient/BlobWorkerInterface.h" #include "fdbclient/ClientBooleanParams.h" #include "fdbclient/StorageServerInterface.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/FDBTypes.h" #include "fdbserver/LogSystemConfig.h" #include "fdbrpc/MultiInterface.h" diff --git a/fdbserver/include/fdbserver/workloads/workloads.actor.h b/fdbserver/include/fdbserver/workloads/workloads.actor.h index 73044e2f5ff..a5e9305e907 100644 --- a/fdbserver/include/fdbserver/workloads/workloads.actor.h +++ b/fdbserver/include/fdbserver/workloads/workloads.actor.h @@ -28,7 +28,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/DatabaseContext.h" // for clone() #include "fdbserver/KnobProtectiveGroups.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbrpc/simulator.h" #include @@ -342,15 +342,15 @@ class TestSpec { std::vector disabledFailureInjectionWorkloads; }; -ACTOR Future runWorkload(Database cx, - std::vector testers, - TestSpec spec, - Optional defaultTenant); +Future runWorkload(Database cx, + std::vector testers, + TestSpec spec, + Optional defaultTenant); void logMetrics(std::vector metrics); -ACTOR Future poisson(double* last, double meanInterval); -ACTOR Future uniform(double* last, double meanInterval); +Future poisson(double* last, double meanInterval); +Future uniform(double* last, double meanInterval); void emplaceIndex(uint8_t* data, int offset, int64_t index); Key doubleToTestKey(double p); @@ -358,7 +358,7 @@ double testKeyToDouble(const KeyRef& p); Key doubleToTestKey(double p, const KeyRef& prefix); double testKeyToDouble(const KeyRef& p, const KeyRef& prefix); -ACTOR Future databaseWarmer(Database cx); +Future databaseWarmer(Database cx); Future quietDatabase(Database const& cx, Reference const> const&, diff --git a/fdbserver/tester.actor.cpp b/fdbserver/tester.actor.cpp index 404cff7d60d..22b88d1621e 100644 --- a/fdbserver/tester.actor.cpp +++ b/fdbserver/tester.actor.cpp @@ -33,6 +33,7 @@ #include #include "flow/ActorCollection.h" +#include "flow/Coroutines.h" #include "flow/DeterministicRandom.h" #include "flow/Histogram.h" #include "flow/ProcessEvents.h" @@ -48,7 +49,7 @@ #include "fdbclient/TenantManagement.actor.h" #include "fdbclient/DataDistributionConfig.actor.h" #include "fdbserver/KnobProtectiveGroups.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/QuietDatabase.h" @@ -152,16 +153,14 @@ double testKeyToDouble(const KeyRef& p, const KeyRef& prefix) { return testKeyToDouble(p.removePrefix(prefix)); } -ACTOR Future poisson(double* last, double meanInterval) { +Future poisson(double* last, double meanInterval) { *last += meanInterval * -log(deterministicRandom()->random01()); - wait(delayUntil(*last)); - return Void(); + co_await delayUntil(*last); } -ACTOR Future uniform(double* last, double meanInterval) { +Future uniform(double* last, double meanInterval) { *last += meanInterval; - wait(delayUntil(*last)); - return Void(); + co_await delayUntil(*last); } Value getOption(VectorRef options, Key key, Value defaultValue) { @@ -394,13 +393,13 @@ Future CompoundWorkload::check(Database const& cx) { return allTrue(all); } -ACTOR Future> getMetricsCompoundWorkload(CompoundWorkload* self) { - state std::vector>> results; +Future> getMetricsCompoundWorkload(CompoundWorkload* self) { + std::vector>> results; for (int w = 0; w < self->workloads.size(); w++) { std::vector p; results.push_back(self->workloads[w]->getMetrics()); } - wait(waitForAll(results)); + co_await waitForAll(results); std::vector res; for (int i = 0; i < results.size(); ++i) { auto const& p = results[i].get(); @@ -408,7 +407,7 @@ ACTOR Future> getMetricsCompoundWorkload(CompoundWorkloa res.push_back(m.withPrefix(self->workloads[i]->description() + ".")); } } - return res; + co_return res; } void CompoundWorkload::addFailureInjection(WorkloadRequest& work) { @@ -498,12 +497,12 @@ Future FailureInjectionWorkload::checkInjectionWorkload(const Database& cx return holdWhile(this->check(cx), done); } -ACTOR Future> getWorkloadIface(WorkloadRequest work, - Reference ccr, - VectorRef options, - Reference const> dbInfo) { - state Reference workload; - state Value testName = getOption(options, "testName"_sr, "no-test-specified"_sr); +Future> getWorkloadIface(WorkloadRequest work, + Reference ccr, + VectorRef options, + Reference const> dbInfo) { + Reference workload; + Value testName = getOption(options, "testName"_sr, "no-test-specified"_sr); WorkloadContext wcx; wcx.clientId = work.clientId; wcx.clientCount = work.clientCount; @@ -516,7 +515,7 @@ ACTOR Future> getWorkloadIface(WorkloadRequest work, workload = IWorkloadFactory::create(testName.toString(), wcx); if (workload) { - wait(workload->initialized()); + co_await workload->initialized(); } auto unconsumedOptions = checkAllOptionsConsumed(workload ? workload->options : VectorRef()); @@ -539,14 +538,14 @@ ACTOR Future> getWorkloadIface(WorkloadRequest work, } throw test_specification_invalid(); } - return workload; + co_return workload; } -ACTOR Future> getWorkloadIface(WorkloadRequest work, - Reference ccr, - Reference const> dbInfo) { - state WorkloadContext wcx; - state std::vector>> ifaces; +Future> getWorkloadIface(WorkloadRequest work, + Reference ccr, + Reference const> dbInfo) { + WorkloadContext wcx; + std::vector>> ifaces; if (work.options.size() < 1) { TraceEvent(SevError, "TestCreationError").detail("Reason", "No options provided"); fprintf(stderr, "ERROR: No options were provided for workload.\n"); @@ -565,13 +564,13 @@ ACTOR Future> getWorkloadIface(WorkloadRequest work, for (int i = 0; i < work.options.size(); i++) { ifaces.push_back(getWorkloadIface(work, ccr, work.options[i], dbInfo)); } - wait(waitForAll(ifaces)); + co_await waitForAll(ifaces); auto compound = makeReference(wcx); for (int i = 0; i < work.options.size(); i++) { compound->add(ifaces[i].getValue()); } compound->addFailureInjection(work); - return compound; + co_return compound; } /** @@ -632,11 +631,11 @@ void printSimulatedTopology() { } } -ACTOR Future databaseWarmer(Database cx) { +Future databaseWarmer(Database cx) { loop { - state Transaction tr(cx); - wait(success(tr.getReadVersion())); - wait(delay(0.25)); + Transaction tr(cx); + co_await tr.getReadVersion(); + co_await delay(0.25); } } @@ -659,21 +658,18 @@ ACTOR Future pingDatabase(Database cx) { } } -ACTOR Future testDatabaseLiveness(Database cx, - double databasePingDelay, - std::string context, - double startDelay = 0.0) { - wait(delay(startDelay)); +Future testDatabaseLiveness(Database cx, double databasePingDelay, std::string context, double startDelay = 0.0) { + co_await delay(startDelay); loop { try { - state double start = now(); + double start = now(); auto traceMsg = "PingingDatabaseLiveness_" + context; TraceEvent(traceMsg.c_str()).log(); - wait(timeoutError(pingDatabase(cx), databasePingDelay)); + co_await timeoutError(pingDatabase(cx), databasePingDelay); double pingTime = now() - start; ASSERT(pingTime > 0); TraceEvent(("PingingDatabaseLivenessDone_" + context).c_str()).detail("TimeTaken", pingTime); - wait(delay(databasePingDelay - pingTime)); + co_await delay(databasePingDelay - pingTime); } catch (Error& e) { if (e.code() != error_code_actor_cancelled) TraceEvent(SevError, ("PingingDatabaseLivenessError_" + context).c_str()) @@ -693,11 +689,10 @@ void sendResult(ReplyPromise& reply, Optional> const& result) { reply.send(res.get()); } -ACTOR Future> getConsistencyCheckUrgentWorkloadIface( - WorkloadRequest work, - Reference ccr, - Reference const> dbInfo) { - state WorkloadContext wcx; +Future> getConsistencyCheckUrgentWorkloadIface(WorkloadRequest work, + Reference ccr, + Reference const> dbInfo) { + WorkloadContext wcx; wcx.clientId = work.clientId; wcx.clientCount = work.clientCount; wcx.sharedRandomNumber = work.sharedRandomNumber; @@ -705,54 +700,48 @@ ACTOR Future> getConsistencyCheckUrgentWorkloadIface( wcx.dbInfo = dbInfo; wcx.defaultTenant = work.defaultTenant.castTo(); wcx.rangesToCheck = work.rangesToCheck; - Reference iface = wait(getWorkloadIface(work, ccr, work.options[0], dbInfo)); - return iface; + co_return co_await getWorkloadIface(work, ccr, work.options[0], dbInfo); } -ACTOR Future runConsistencyCheckUrgentWorkloadAsync(Database cx, - WorkloadInterface workIface, - Reference workload) { - state ReplyPromise jobReq; - loop choose { - when(ReplyPromise req = waitNext(workIface.start.getFuture())) { - jobReq = req; - try { - TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadReceived", workIface.id()) - .detail("WorkloadName", workload->description()) - .detail("ClientCount", workload->clientCount) - .detail("ClientId", workload->clientId); - wait(workload->start(cx)); - jobReq.send(Void()); - } catch (Error& e) { - if (e.code() == error_code_actor_cancelled) { - throw e; - } - TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadError", workIface.id()) - .errorUnsuppressed(e) - .detail("WorkloadName", workload->description()) - .detail("ClientCount", workload->clientCount) - .detail("ClientId", workload->clientId); - jobReq.sendError(consistency_check_urgent_task_failed()); - } - break; +// TODO: const & here? +Future runConsistencyCheckUrgentWorkloadAsync(Database cx, + WorkloadInterface workIface, + Reference workload) { + ReplyPromise jobReq = co_await workIface.start.getFuture(); + try { + TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadReceived", workIface.id()) + .detail("WorkloadName", workload->description()) + .detail("ClientCount", workload->clientCount) + .detail("ClientId", workload->clientId); + co_await workload->start(cx); + jobReq.send(Void()); + } catch (Error& e) { + if (e.code() == error_code_actor_cancelled) { + throw e; } + TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadError", workIface.id()) + .errorUnsuppressed(e) + .detail("WorkloadName", workload->description()) + .detail("ClientCount", workload->clientCount) + .detail("ClientId", workload->clientId); + jobReq.sendError(consistency_check_urgent_task_failed()); } - return Void(); } -ACTOR Future testerServerConsistencyCheckerUrgentWorkload(WorkloadRequest work, - Reference ccr, - Reference const> dbInfo) { - state WorkloadInterface workIface; - state bool replied = false; +// TODO: const & here? +Future testerServerConsistencyCheckerUrgentWorkload(WorkloadRequest work, + Reference ccr, + Reference const> dbInfo) { + WorkloadInterface workIface; + bool replied = false; try { - state Database cx = openDBOnServer(dbInfo); - wait(delay(1.0)); - Reference workload = wait(getConsistencyCheckUrgentWorkloadIface(work, ccr, dbInfo)); + Database cx = openDBOnServer(dbInfo); + co_await delay(1.0); + Reference workload = co_await getConsistencyCheckUrgentWorkloadIface(work, ccr, dbInfo); Future test = runConsistencyCheckUrgentWorkloadAsync(cx, workIface, workload); work.reply.send(workIface); replied = true; - wait(test); + co_await test; } catch (Error& e) { if (e.code() == error_code_actor_cancelled) { throw e; @@ -762,7 +751,6 @@ ACTOR Future testerServerConsistencyCheckerUrgentWorkload(WorkloadRequest work.reply.sendError(e); } } - return Void(); } ACTOR Future runWorkloadAsync(Database cx, @@ -871,13 +859,13 @@ ACTOR Future runWorkloadAsync(Database cx, return Void(); } -ACTOR Future testerServerWorkload(WorkloadRequest work, - Reference ccr, - Reference const> dbInfo, - LocalityData locality) { - state WorkloadInterface workIface; - state bool replied = false; - state Database cx; +Future testerServerWorkload(WorkloadRequest work, + Reference ccr, + Reference const> dbInfo, + LocalityData locality) { + WorkloadInterface workIface; + bool replied = false; + Database cx; try { std::map details; details["WorkloadTitle"] = printable(work.title); @@ -889,12 +877,12 @@ ACTOR Future testerServerWorkload(WorkloadRequest work, if (work.useDatabase) { cx = Database::createDatabase(ccr, ApiVersion::LATEST_VERSION, IsInternal::True, locality); cx->defaultTenant = work.defaultTenant.castTo(); - wait(delay(1.0)); + co_await delay(1.0); } // add test for "done" ? TraceEvent("WorkloadReceived", workIface.id()).detail("Title", work.title); - Reference workload = wait(getWorkloadIface(work, ccr, dbInfo)); + Reference workload = co_await getWorkloadIface(work, ccr, dbInfo); if (!workload) { TraceEvent("TestCreationError").detail("Reason", "Workload could not be created"); fprintf(stderr, "ERROR: The workload could not be created.\n"); @@ -909,7 +897,7 @@ ACTOR Future testerServerWorkload(WorkloadRequest work, test = timeoutError(test, work.timeout); } - wait(test); + co_await test; endRole(Role::TESTER, workIface.id(), "Complete"); } catch (Error& e) { @@ -929,64 +917,67 @@ ACTOR Future testerServerWorkload(WorkloadRequest work, throw; // fatal errors will kill the testerServer as well } } - return Void(); } -ACTOR Future testerServerCore(TesterInterface interf, - Reference ccr, - Reference const> dbInfo, - LocalityData locality, - Optional expectedWorkLoad) { - state PromiseStream> addWorkload; - state Future workerFatalError = actorCollection(addWorkload.getFuture()); +Future testerServerCore(const TesterInterface& interf, + Reference ccr, + Reference const> dbInfo, + LocalityData locality, + Optional expectedWorkLoad) { + PromiseStream> addWorkload; + Future workerFatalError = actorCollection(addWorkload.getFuture()); // Dedicated to consistencyCheckerUrgent // At any time, we only allow at most 1 consistency checker workload on a server - state std::pair> consistencyCheckerUrgentTester = std::make_pair(0, Future()); + std::pair> consistencyCheckerUrgentTester = std::make_pair(0, Future()); TraceEvent("StartingTesterServerCore", interf.id()) .detail("ExpectedWorkload", expectedWorkLoad.present() ? expectedWorkLoad.get() : "[Unset]"); - loop choose { - when(wait(workerFatalError)) {} - when(wait(consistencyCheckerUrgentTester.second.isValid() ? consistencyCheckerUrgentTester.second : Never())) { - ASSERT(consistencyCheckerUrgentTester.first != 0); - TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadEnd", interf.id()) - .detail("ConsistencyCheckerId", consistencyCheckerUrgentTester.first); - consistencyCheckerUrgentTester = std::make_pair(0, Future()); // reset - } - when(WorkloadRequest work = waitNext(interf.recruitments.getFuture())) { - if (expectedWorkLoad.present() && expectedWorkLoad.get() != work.title) { - TraceEvent(SevError, "StartingTesterServerCoreUnexpectedWorkload", interf.id()) - .detail("ClientId", work.clientId) - .detail("ClientCount", work.clientCount) - .detail("ExpectedWorkLoad", expectedWorkLoad.get()) - .detail("WorkLoad", work.title); - // Drop the workload - } else if (work.title == "ConsistencyCheckUrgent") { - // The workload is a consistency checker urgent workload - if (work.sharedRandomNumber == consistencyCheckerUrgentTester.first) { - TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterDuplicatedRequest", interf.id()) - .detail("ConsistencyCheckerId", work.sharedRandomNumber) - .detail("ClientId", work.clientId) - .detail("ClientCount", work.clientCount); - } else if (consistencyCheckerUrgentTester.second.isValid() && - !consistencyCheckerUrgentTester.second.isReady()) { - TraceEvent(SevWarnAlways, "ConsistencyCheckUrgent_TesterWorkloadConflict", interf.id()) - .detail("ExistingConsistencyCheckerId", consistencyCheckerUrgentTester.first) - .detail("ArrivingConsistencyCheckerId", work.sharedRandomNumber) - .detail("ClientId", work.clientId) - .detail("ClientCount", work.clientCount); - } - consistencyCheckerUrgentTester = std::make_pair( - work.sharedRandomNumber, testerServerConsistencyCheckerUrgentWorkload(work, ccr, dbInfo)); - TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadInitialized", interf.id()) - .detail("ConsistencyCheckerId", consistencyCheckerUrgentTester.first) - .detail("ClientId", work.clientId) - .detail("ClientCount", work.clientCount); - } else { - addWorkload.send(testerServerWorkload(work, ccr, dbInfo, locality)); - } - } + loop { + co_await Choose() + .When(workerFatalError, [](const Void&) {}) + .When(consistencyCheckerUrgentTester.second.isValid() ? consistencyCheckerUrgentTester.second : Never(), + [&](const Void&) { + ASSERT(consistencyCheckerUrgentTester.first != 0); + TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadEnd", interf.id()) + .detail("ConsistencyCheckerId", consistencyCheckerUrgentTester.first); + consistencyCheckerUrgentTester = std::make_pair(0, Future()); // reset + }) + .When(interf.recruitments.getFuture(), + [&](const WorkloadRequest& work) { + if (expectedWorkLoad.present() && expectedWorkLoad.get() != work.title) { + TraceEvent(SevError, "StartingTesterServerCoreUnexpectedWorkload", interf.id()) + .detail("ClientId", work.clientId) + .detail("ClientCount", work.clientCount) + .detail("ExpectedWorkLoad", expectedWorkLoad.get()) + .detail("WorkLoad", work.title); + // Drop the workload + } else if (work.title == "ConsistencyCheckUrgent") { + // The workload is a consistency checker urgent workload + if (work.sharedRandomNumber == consistencyCheckerUrgentTester.first) { + TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterDuplicatedRequest", interf.id()) + .detail("ConsistencyCheckerId", work.sharedRandomNumber) + .detail("ClientId", work.clientId) + .detail("ClientCount", work.clientCount); + } else if (consistencyCheckerUrgentTester.second.isValid() && + !consistencyCheckerUrgentTester.second.isReady()) { + TraceEvent(SevWarnAlways, "ConsistencyCheckUrgent_TesterWorkloadConflict", interf.id()) + .detail("ExistingConsistencyCheckerId", consistencyCheckerUrgentTester.first) + .detail("ArrivingConsistencyCheckerId", work.sharedRandomNumber) + .detail("ClientId", work.clientId) + .detail("ClientCount", work.clientCount); + } + consistencyCheckerUrgentTester = std::make_pair( + work.sharedRandomNumber, testerServerConsistencyCheckerUrgentWorkload(work, ccr, dbInfo)); + TraceEvent(SevInfo, "ConsistencyCheckUrgent_TesterWorkloadInitialized", interf.id()) + .detail("ConsistencyCheckerId", consistencyCheckerUrgentTester.first) + .detail("ClientId", work.clientId) + .detail("ClientCount", work.clientCount); + } else { + addWorkload.send(testerServerWorkload(work, ccr, dbInfo, locality)); + } + }) + .run(); } } @@ -1161,9 +1152,9 @@ struct TesterConsistencyScanState { bool waitForComplete = false; }; -ACTOR Future checkConsistencyScanAfterTest(Database cx, TesterConsistencyScanState* csState) { +Future checkConsistencyScanAfterTest(Database cx, TesterConsistencyScanState* csState) { if (!csState->enabled) { - return Void(); + co_return; } // mark it as done so later so this does not repeat @@ -1171,33 +1162,30 @@ ACTOR Future checkConsistencyScanAfterTest(Database cx, TesterConsistencyS if (csState->enableAfter || csState->waitForComplete) { printf("Enabling consistency scan after test ...\n"); - wait(enableConsistencyScanInSim(cx)); + co_await enableConsistencyScanInSim(cx); printf("Enabled consistency scan after test.\n"); } - wait(disableConsistencyScanInSim(cx, csState->waitForComplete)); - - return Void(); + co_await disableConsistencyScanInSim(cx, csState->waitForComplete); } -ACTOR Future runWorkload(Database cx, - std::vector testers, - TestSpec spec, - Optional defaultTenant) { +Future runWorkload(Database cx, + std::vector testers, + TestSpec spec, + Optional defaultTenant) { TraceEvent("TestRunning") .detail("WorkloadTitle", spec.title) .detail("TesterCount", testers.size()) .detail("Phases", spec.phases) .detail("TestTimeout", spec.timeout); - state std::vector> workRequests; - state std::vector> metricsResults; + std::vector> workRequests; + std::vector> metricsResults; - state int i = 0; - state int success = 0; - state int failure = 0; + int success = 0; + int failure = 0; int64_t sharedRandom = deterministicRandom()->randomInt64(0, 10000000); - for (; i < testers.size(); i++) { + for (int i = 0; i < testers.size(); i++) { WorkloadRequest req; req.title = spec.title; req.useDatabase = spec.useDB; @@ -1213,19 +1201,19 @@ ACTOR Future runWorkload(Database cx, workRequests.push_back(testers[i].recruitments.getReply(req)); } - state std::vector workloads = wait(getAll(workRequests)); - state double waitForFailureTime = g_network->isSimulated() ? 24 * 60 * 60 : 60; + std::vector workloads = co_await getAll(workRequests); + double waitForFailureTime = g_network->isSimulated() ? 24 * 60 * 60 : 60; if (g_network->isSimulated() && spec.simCheckRelocationDuration) debug_setCheckRelocationDuration(true); if (spec.phases & TestWorkload::SETUP) { - state std::vector>> setups; + std::vector>> setups; printf("setting up test (%s)...\n", printable(spec.title).c_str()); TraceEvent("TestSetupStart").detail("WorkloadTitle", spec.title); setups.reserve(workloads.size()); for (int i = 0; i < workloads.size(); i++) setups.push_back(workloads[i].setup.template getReplyUnlessFailedFor(waitForFailureTime, 0)); - wait(waitForAll(setups)); + co_await waitForAll(setups); throwIfError(setups, "SetupFailedForWorkload" + printable(spec.title)); TraceEvent("TestSetupComplete").detail("WorkloadTitle", spec.title); } @@ -1233,11 +1221,11 @@ ACTOR Future runWorkload(Database cx, if (spec.phases & TestWorkload::EXECUTION) { TraceEvent("TestStarting").detail("WorkloadTitle", spec.title); printf("running test (%s)...\n", printable(spec.title).c_str()); - state std::vector>> starts; + std::vector>> starts; starts.reserve(workloads.size()); for (int i = 0; i < workloads.size(); i++) starts.push_back(workloads[i].start.template getReplyUnlessFailedFor(waitForFailureTime, 0)); - wait(waitForAll(starts)); + co_await waitForAll(starts); throwIfError(starts, "StartFailedForWorkload" + printable(spec.title)); printf("%s complete\n", printable(spec.title).c_str()); TraceEvent("TestComplete").detail("WorkloadTitle", spec.title); @@ -1245,10 +1233,10 @@ ACTOR Future runWorkload(Database cx, if (spec.phases & TestWorkload::CHECK) { if (spec.useDB && (spec.phases & TestWorkload::EXECUTION)) { - wait(delay(3.0)); + co_await delay(3.0); } - state std::vector>> checks; + std::vector>> checks; TraceEvent("TestCheckingResults").detail("WorkloadTitle", spec.title); printf("checking test (%s)...\n", printable(spec.title).c_str()); @@ -1256,7 +1244,7 @@ ACTOR Future runWorkload(Database cx, checks.reserve(workloads.size()); for (int i = 0; i < workloads.size(); i++) checks.push_back(workloads[i].check.template getReplyUnlessFailedFor(waitForFailureTime, 0)); - wait(waitForAll(checks)); + co_await waitForAll(checks); throwIfError(checks, "CheckFailedForWorkload" + printable(spec.title)); @@ -1270,14 +1258,14 @@ ACTOR Future runWorkload(Database cx, } if (spec.phases & TestWorkload::METRICS) { - state std::vector>>> metricTasks; + std::vector>>> metricTasks; printf("fetching metrics (%s)...\n", printable(spec.title).c_str()); TraceEvent("TestFetchingMetrics").detail("WorkloadTitle", spec.title); metricTasks.reserve(workloads.size()); for (int i = 0; i < workloads.size(); i++) metricTasks.push_back( workloads[i].metrics.template getReplyUnlessFailedFor>(waitForFailureTime, 0)); - wait(waitForAll(metricTasks)); + co_await waitForAll(metricTasks); throwIfError(metricTasks, "MetricFailedForWorkload" + printable(spec.title)); for (int i = 0; i < metricTasks.size(); i++) { metricsResults.push_back(metricTasks[i].get().get()); @@ -1289,12 +1277,12 @@ ACTOR Future runWorkload(Database cx, for (int i = 0; i < workloads.size(); i++) workloads[i].stop.send(ReplyPromise()); - return DistributedTestResults(aggregateMetrics(metricsResults), success, failure); + co_return DistributedTestResults(aggregateMetrics(metricsResults), success, failure); } // Sets the database configuration by running the ChangeConfig workload -ACTOR Future changeConfiguration(Database cx, std::vector testers, StringRef configMode) { - state TestSpec spec; +Future changeConfiguration(Database cx, std::vector testers, StringRef configMode) { + TestSpec spec; Standalone> options; spec.title = "ChangeConfig"_sr; spec.runFailureWorkloads = false; @@ -1302,9 +1290,7 @@ ACTOR Future changeConfiguration(Database cx, std::vector options.push_back_deep(options.arena(), KeyValueRef("configMode"_sr, configMode)); spec.options.push_back_deep(spec.options.arena(), options); - DistributedTestResults testResults = wait(runWorkload(cx, testers, spec, Optional())); - - return Void(); + co_await runWorkload(cx, testers, spec, Optional()); } ACTOR Future auditStorageCorrectness(Reference> dbInfo, AuditType auditType) { @@ -1380,18 +1366,18 @@ ACTOR Future auditStorageCorrectness(Reference> dbI } // Runs the consistency check workload, which verifies that the database is in a consistent state -ACTOR Future checkConsistency(Database cx, - std::vector testers, - bool doQuiescentCheck, - bool doCacheCheck, - bool doTSSCheck, - double quiescentWaitTimeout, - double softTimeLimit, - double databasePingDelay, - Reference> dbInfo) { - state TestSpec spec; - - state double connectionFailures; +Future checkConsistency(Database cx, + const std::vector& testers, + bool doQuiescentCheck, + bool doCacheCheck, + bool doTSSCheck, + double quiescentWaitTimeout, + double softTimeLimit, + double databasePingDelay, + Reference> dbInfo) { + TestSpec spec; + + double connectionFailures; if (g_network->isSimulated()) { // NOTE: the value will be reset after consistency check connectionFailures = g_simulator->connectionFailuresDisableDuration; @@ -1427,23 +1413,23 @@ ACTOR Future checkConsistency(Database cx, options.push_back_deep(options.arena(), KeyValueRef("distributed"_sr, "false"_sr)); spec.options.push_back_deep(spec.options.arena(), options); - state double start = now(); - state bool lastRun = false; + double start = now(); + bool lastRun = false; loop { - DistributedTestResults testResults = wait(runWorkload(cx, testers, spec, Optional())); + DistributedTestResults testResults = co_await runWorkload(cx, testers, spec, Optional()); if (testResults.ok() || lastRun) { if (g_network->isSimulated()) { g_simulator->connectionFailuresDisableDuration = connectionFailures; g_simulator->isConsistencyChecked = false; } - return Void(); + co_return; } if (now() - start > softTimeLimit) { spec.options[0].push_back_deep(spec.options.arena(), KeyValueRef("failureIsError"_sr, "true"_sr)); lastRun = true; } - wait(repairDeadDatacenter(cx, dbInfo, "ConsistencyCheck")); + co_await repairDeadDatacenter(cx, dbInfo, "ConsistencyCheck"); } } @@ -1930,19 +1916,18 @@ ACTOR Future runConsistencyCheckerUrgentCore(Reference runConsistencyCheckerUrgentHolder(Reference>> cc, - Database cx, - Optional> testers, - int minTestersExpected, - bool repeatRun) { +Future runConsistencyCheckerUrgentHolder(Reference>> cc, + Database cx, + Optional> testers, + int minTestersExpected, + bool repeatRun) { loop { - wait(runConsistencyCheckerUrgentCore(cc, cx, testers, minTestersExpected)); + co_await runConsistencyCheckerUrgentCore(cc, cx, testers, minTestersExpected); if (!repeatRun) { - break; + co_return; } - wait(delay(CLIENT_KNOBS->CONSISTENCY_CHECK_URGENT_NEXT_WAIT_TIME)); + co_await delay(CLIENT_KNOBS->CONSISTENCY_CHECK_URGENT_NEXT_WAIT_TIME); } - return Void(); } Future checkConsistencyUrgentSim(Database cx, std::vector testers) { @@ -1950,14 +1935,14 @@ Future checkConsistencyUrgentSim(Database cx, std::vector Reference>>(), cx, testers, 1, /*repeatRun=*/false); } -ACTOR Future runTest(Database cx, - std::vector testers, - TestSpec spec, - Reference> dbInfo, - Optional defaultTenant, - TesterConsistencyScanState* consistencyScanState) { - state DistributedTestResults testResults; - state double savedDisableDuration = 0; +Future runTest(Database cx, + const std::vector& testers, + const TestSpec& spec, + Reference> dbInfo, + Optional defaultTenant, + TesterConsistencyScanState* consistencyScanState) { + DistributedTestResults testResults; + double savedDisableDuration = 0; try { Future fTestResults = runWorkload(cx, testers, spec, defaultTenant); @@ -1968,9 +1953,8 @@ ACTOR Future runTest(Database cx, if (spec.timeout > 0) { fTestResults = timeoutError(fTestResults, spec.timeout); } - DistributedTestResults _testResults = wait(fTestResults); + testResults = co_await fTestResults; printf("Test complete\n"); - testResults = _testResults; logMetrics(testResults.metrics); if (g_network->isSimulated() && savedDisableDuration > 0) { g_simulator->connectionFailuresDisableDuration = savedDisableDuration; @@ -1990,44 +1974,44 @@ ACTOR Future runTest(Database cx, throw; } - state bool ok = testResults.ok(); + bool ok = testResults.ok(); if (spec.useDB) { printf("%d test clients passed; %d test clients failed\n", testResults.successes, testResults.failures); if (spec.dumpAfterTest) { try { - wait(timeoutError(dumpDatabase(cx, "dump after " + printable(spec.title) + ".html", allKeys), 30.0)); + co_await timeoutError(dumpDatabase(cx, "dump after " + printable(spec.title) + ".html", allKeys), 30.0); } catch (Error& e) { TraceEvent(SevError, "TestFailure").error(e).detail("Reason", "Unable to dump database"); ok = false; } - wait(delay(1.0)); + co_await delay(1.0); } // Disable consistency scan before checkConsistency because otherwise it will prevent quiet database from // quiescing - wait(checkConsistencyScanAfterTest(cx, consistencyScanState)); + co_await checkConsistencyScanAfterTest(cx, consistencyScanState); printf("Consistency scan done\n"); // Run the consistency check workload if (spec.runConsistencyCheck) { - state bool quiescent = g_network->isSimulated() ? !BUGGIFY : spec.waitForQuiescenceEnd; + bool quiescent = g_network->isSimulated() ? !BUGGIFY : spec.waitForQuiescenceEnd; try { printf("Running urgent consistency check...\n"); // For testing urgent consistency check - wait(timeoutError(checkConsistencyUrgentSim(cx, testers), 20000.0)); + co_await timeoutError(checkConsistencyUrgentSim(cx, testers), 20000.0); printf("Urgent consistency check done\nRunning consistency check...\n"); - wait(timeoutError(checkConsistency(cx, - testers, - quiescent, - spec.runConsistencyCheckOnCache, - spec.runConsistencyCheckOnTSS, - 10000.0, - 5000, - spec.databasePingDelay, - dbInfo), - 20000.0)); + co_await timeoutError(checkConsistency(cx, + testers, + quiescent, + spec.runConsistencyCheckOnCache, + spec.runConsistencyCheckOnTSS, + 10000.0, + 5000, + spec.databasePingDelay, + dbInfo), + 20000.0); printf("Consistency check done\n"); } catch (Error& e) { TraceEvent(SevError, "TestFailure").error(e).detail("Reason", "Unable to perform consistency check"); @@ -2038,13 +2022,14 @@ ACTOR Future runTest(Database cx, if (quiescent && g_network->isSimulated()) { try { TraceEvent("AuditStorageStart"); - wait(timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateHA), 1000.0)); + co_await timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateHA), 1000.0); TraceEvent("AuditStorageCorrectnessHADone"); - wait(timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateReplica), 1000.0)); + co_await timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateReplica), 1000.0); TraceEvent("AuditStorageCorrectnessReplicaDone"); - wait(timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateLocationMetadata), 1000.0)); + co_await timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateLocationMetadata), 1000.0); TraceEvent("AuditStorageCorrectnessLocationMetadataDone"); - wait(timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateStorageServerShard), 1000.0)); + co_await timeoutError(auditStorageCorrectness(dbInfo, AuditType::ValidateStorageServerShard), + 1000.0); TraceEvent("AuditStorageCorrectnessStorageServerShardDone"); } catch (Error& e) { ok = false; @@ -2070,16 +2055,16 @@ ACTOR Future runTest(Database cx, if (spec.useDB && spec.clearAfterTest) { try { TraceEvent("TesterClearingDatabase").log(); - wait(timeoutError(clearData(cx, defaultTenant), 1000.0)); + co_await timeoutError(clearData(cx, defaultTenant), 1000.0); } catch (Error& e) { TraceEvent(SevError, "ErrorClearingDatabaseAfterTest").error(e); throw; // If we didn't do this, we don't want any later tests to run on this DB } - wait(delay(1.0)); + co_await delay(1.0); } - return ok; + co_return ok; } std::map> testSpecGlobalKeys = { @@ -2457,97 +2442,93 @@ TestSet readTOMLTests(std::string fileName) { } } -ACTOR Future monitorServerDBInfo(Reference>> ccInterface, - LocalityData locality, - Reference> dbInfo) { +Future monitorServerDBInfo(Reference>> ccInterface, + LocalityData locality, + Reference> dbInfo) { // Initially most of the serverDBInfo is not known, but we know our locality right away - ServerDBInfo localInfo; - localInfo.myLocality = locality; - dbInfo->set(localInfo); + ServerDBInfo tmp; + tmp.myLocality = locality; + dbInfo->set(tmp); loop { GetServerDBInfoRequest req; req.knownServerInfoID = dbInfo->get().id; - choose { - when(ServerDBInfo _localInfo = - wait(ccInterface->get().present() - ? brokenPromiseToNever(ccInterface->get().get().getServerDBInfo.getReply(req)) - : Never())) { - ServerDBInfo localInfo = _localInfo; - TraceEvent("GotServerDBInfoChange") - .detail("ChangeID", localInfo.id) - .detail("MasterID", localInfo.master.id()) - .detail("RatekeeperID", localInfo.ratekeeper.present() ? localInfo.ratekeeper.get().id() : UID()) - .detail("DataDistributorID", - localInfo.distributor.present() ? localInfo.distributor.get().id() : UID()); - - localInfo.myLocality = locality; - dbInfo->set(localInfo); - } - when(wait(ccInterface->onChange())) { - if (ccInterface->get().present()) - TraceEvent("GotCCInterfaceChange") - .detail("CCID", ccInterface->get().get().id()) - .detail("CCMachine", ccInterface->get().get().getWorkers.getEndpoint().getPrimaryAddress()); - } - } - } -} - -ACTOR Future initializeSimConfig(Database db) { - state Transaction tr(db); + co_await Choose() + .When(ccInterface->get().present() + ? brokenPromiseToNever(ccInterface->get().get().getServerDBInfo.getReply(req)) + : Never(), + [&dbInfo, &locality](const ServerDBInfo& _localInfo) { + auto localInfo = _localInfo; + TraceEvent("GotServerDBInfoChange") + .detail("ChangeID", localInfo.id) + .detail("MasterID", localInfo.master.id()) + .detail("RatekeeperID", + localInfo.ratekeeper.present() ? localInfo.ratekeeper.get().id() : UID()) + .detail("DataDistributorID", + localInfo.distributor.present() ? localInfo.distributor.get().id() : UID()); + + localInfo.myLocality = locality; + dbInfo->set(localInfo); + }) + .When(ccInterface->onChange(), + [&ccInterface](const Void&) { + if (ccInterface->get().present()) + TraceEvent("GotCCInterfaceChange") + .detail("CCID", ccInterface->get().get().id()) + .detail("CCMachine", + ccInterface->get().get().getWorkers.getEndpoint().getPrimaryAddress()); + }) + .run(); + } +} + +Future initializeSimConfig(Database db) { ASSERT(g_network->isSimulated()); - loop { - try { - DatabaseConfiguration dbConfig = wait(getDatabaseConfiguration(&tr)); - g_simulator->storagePolicy = dbConfig.storagePolicy; - g_simulator->tLogPolicy = dbConfig.tLogPolicy; - g_simulator->tLogWriteAntiQuorum = dbConfig.tLogWriteAntiQuorum; - g_simulator->usableRegions = dbConfig.usableRegions; - - // If the same region is being shared between the remote and a satellite, then our simulated policy checking - // may fail to account for the total number of needed machines when deciding what can be killed. To work - // around this, we increase the required transaction logs in the remote policy to include the number of - // satellite logs that may get recruited there - bool foundSharedDcId = false; - std::set dcIds; - int maxSatelliteReplication = 0; - for (auto const& r : dbConfig.regions) { - if (!dcIds.insert(r.dcId).second) { - foundSharedDcId = true; - } - if (!r.satellites.empty() && r.satelliteTLogReplicationFactor > 0 && r.satelliteTLogUsableDcs > 0) { - for (auto const& s : r.satellites) { - if (!dcIds.insert(s.dcId).second) { - foundSharedDcId = true; - } + co_await db.run([](Transaction* tr) -> Future { + DatabaseConfiguration dbConfig = co_await getDatabaseConfiguration(tr); + g_simulator->storagePolicy = dbConfig.storagePolicy; + g_simulator->tLogPolicy = dbConfig.tLogPolicy; + g_simulator->tLogWriteAntiQuorum = dbConfig.tLogWriteAntiQuorum; + g_simulator->usableRegions = dbConfig.usableRegions; + + // If the same region is being shared between the remote and a satellite, then our simulated policy checking + // may fail to account for the total number of needed machines when deciding what can be killed. To work + // around this, we increase the required transaction logs in the remote policy to include the number of + // satellite logs that may get recruited there + bool foundSharedDcId = false; + std::set dcIds; + int maxSatelliteReplication = 0; + for (auto const& r : dbConfig.regions) { + if (!dcIds.insert(r.dcId).second) { + foundSharedDcId = true; + } + if (!r.satellites.empty() && r.satelliteTLogReplicationFactor > 0 && r.satelliteTLogUsableDcs > 0) { + for (auto const& s : r.satellites) { + if (!dcIds.insert(s.dcId).second) { + foundSharedDcId = true; } - - maxSatelliteReplication = - std::max(maxSatelliteReplication, r.satelliteTLogReplicationFactor / r.satelliteTLogUsableDcs); } - } - if (foundSharedDcId) { - int totalRequired = std::max(dbConfig.tLogReplicationFactor, dbConfig.remoteTLogReplicationFactor) + - maxSatelliteReplication; - g_simulator->remoteTLogPolicy = Reference( - new PolicyAcross(totalRequired, "zoneid", Reference(new PolicyOne()))); - TraceEvent("ChangingSimTLogPolicyForSharedRemote") - .detail("TotalRequired", totalRequired) - .detail("MaxSatelliteReplication", maxSatelliteReplication) - .detail("ActualPolicy", dbConfig.getRemoteTLogPolicy()->info()) - .detail("SimulatorPolicy", g_simulator->remoteTLogPolicy->info()); - } else { - g_simulator->remoteTLogPolicy = dbConfig.getRemoteTLogPolicy(); + maxSatelliteReplication = + std::max(maxSatelliteReplication, r.satelliteTLogReplicationFactor / r.satelliteTLogUsableDcs); } + } - return Void(); - } catch (Error& e) { - wait(tr.onError(e)); + if (foundSharedDcId) { + int totalRequired = std::max(dbConfig.tLogReplicationFactor, dbConfig.remoteTLogReplicationFactor) + + maxSatelliteReplication; + g_simulator->remoteTLogPolicy = Reference( + new PolicyAcross(totalRequired, "zoneid", Reference(new PolicyOne()))); + TraceEvent("ChangingSimTLogPolicyForSharedRemote") + .detail("TotalRequired", totalRequired) + .detail("MaxSatelliteReplication", maxSatelliteReplication) + .detail("ActualPolicy", dbConfig.getRemoteTLogPolicy()->info()) + .detail("SimulatorPolicy", g_simulator->remoteTLogPolicy->info()); + } else { + g_simulator->remoteTLogPolicy = dbConfig.getRemoteTLogPolicy(); } - } + }); } void encryptionAtRestPlaintextMarkerCheck() { @@ -2609,14 +2590,13 @@ void encryptionAtRestPlaintextMarkerCheck() { } // Disables connection failures after the given time seconds -ACTOR Future disableConnectionFailuresAfter(double seconds, std::string context) { +Future disableConnectionFailuresAfter(double seconds, std::string context) { if (g_network->isSimulated()) { TraceEvent(SevWarnAlways, ("ScheduleDisableConnectionFailures_" + context).c_str()) .detail("At", now() + seconds); - wait(delay(seconds)); + co_await delay(seconds); disableConnectionFailures(context); } - return Void(); } /** @@ -2637,30 +2617,30 @@ ACTOR Future disableConnectionFailuresAfter(double seconds, std::string co * * \returns A future which will be set after all tests finished. */ -ACTOR Future runTests(Reference>> cc, - Reference>> ci, - std::vector testers, - std::vector tests, - StringRef startingConfiguration, - LocalityData locality, - Optional defaultTenant, - Standalone> tenantsToCreate, - bool restartingTest) { - state Database cx; - state Reference> dbInfo(new AsyncVar); - state Future ccMonitor = monitorServerDBInfo(cc, LocalityData(), dbInfo); // FIXME: locality - - state bool useDB = false; - state bool waitForQuiescenceBegin = false; - state bool waitForQuiescenceEnd = false; - state bool restorePerpetualWiggleSetting = false; - state bool perpetualWiggleEnabled = false; - state double startDelay = 0.0; - state double databasePingDelay = 1e9; - state ISimulator::BackupAgentType simBackupAgents = ISimulator::BackupAgentType::NoBackupAgents; - state ISimulator::BackupAgentType simDrAgents = ISimulator::BackupAgentType::NoBackupAgents; - state bool enableDD = false; - state TesterConsistencyScanState consistencyScanState; +Future runTests(Reference>> cc, + Reference>> ci, + std::vector testers, + std::vector tests, + StringRef startingConfiguration, + LocalityData locality, + Optional defaultTenant, + Standalone> tenantsToCreate, + bool restartingTest) { + Database cx; + Reference> dbInfo(new AsyncVar); + Future ccMonitor = monitorServerDBInfo(cc, LocalityData(), dbInfo); // FIXME: locality + + bool useDB = false; + bool waitForQuiescenceBegin = false; + bool waitForQuiescenceEnd = false; + bool restorePerpetualWiggleSetting = false; + bool perpetualWiggleEnabled = false; + double startDelay = 0.0; + double databasePingDelay = 1e9; + ISimulator::BackupAgentType simBackupAgents = ISimulator::BackupAgentType::NoBackupAgents; + ISimulator::BackupAgentType simDrAgents = ISimulator::BackupAgentType::NoBackupAgents; + bool enableDD = false; + TesterConsistencyScanState consistencyScanState; if (tests.empty()) useDB = true; @@ -2711,9 +2691,9 @@ ACTOR Future runTests(ReferenceisSimulated() && enableDD) { - wait(success(setDDMode(cx, 1))); + co_await setDDMode(cx, 1); } } catch (Error& e) { TraceEvent(SevError, "TestFailure").error(e).detail("Reason", "Unable to set starting configuration"); @@ -2731,7 +2711,7 @@ ACTOR Future runTests(ReferenceisSimulated()) { - DatabaseConfiguration configuration = wait(getDatabaseConfiguration(cx)); + DatabaseConfiguration configuration = co_await getDatabaseConfiguration(cx); g_simulator->storagePolicy = configuration.storagePolicy; g_simulator->tLogPolicy = configuration.tLogPolicy; @@ -2783,7 +2763,7 @@ ACTOR Future runTests(Referencerandom01() < 0.25) { - wait(customShardConfigWorkload(cx)); + co_await customShardConfigWorkload(cx); } } @@ -2798,9 +2778,9 @@ ACTOR Future runTests(ReferenceisSimulated()) { - wait(initializeSimConfig(cx)); + co_await initializeSimConfig(cx); } } @@ -2810,10 +2790,11 @@ ACTOR Future runTests(Reference runTests(Reference disabler = disableConnectionFailuresAfter(FLOW_KNOBS->SIM_SPEEDUP_AFTER_SECONDS, "Tester"); - state Future repairDataCenter; + Future disabler = disableConnectionFailuresAfter(FLOW_KNOBS->SIM_SPEEDUP_AFTER_SECONDS, "Tester"); + Future repairDataCenter; if (useDB) { Future reconfigure = reconfigureAfter(cx, FLOW_KNOBS->SIM_SPEEDUP_AFTER_SECONDS, dbInfo, "Tester"); repairDataCenter = reconfigure; } TraceEvent("TestsExpectedToPass").detail("Count", tests.size()); - state int idx = 0; - state std::unique_ptr knobProtectiveGroup; + int idx = 0; + std::unique_ptr knobProtectiveGroup; for (; idx < tests.size(); idx++) { printf("Run test:%s start\n", tests[idx].title.toString().c_str()); knobProtectiveGroup = std::make_unique(tests[idx].overrideKnobs); - wait(success(runTest(cx, testers, tests[idx], dbInfo, defaultTenant, &consistencyScanState))); + co_await runTest(cx, testers, tests[idx], dbInfo, defaultTenant, &consistencyScanState); knobProtectiveGroup.reset(nullptr); printf("Run test:%s Done.\n", tests[idx].title.toString().c_str()); // do we handle a failure here? @@ -2869,7 +2849,7 @@ ACTOR Future runTests(Reference runTests(Reference runTests(Reference runTests(Reference>> cc, - Reference>> ci, - std::vector tests, - test_location_t at, - int minTestersExpected, - StringRef startingConfiguration, - LocalityData locality, - Optional defaultTenant, - Standalone> tenantsToCreate, - bool restartingTest) { - state int flags = (at == TEST_ON_SERVERS ? 0 : GetWorkersRequest::TESTER_CLASS_ONLY) | - GetWorkersRequest::NON_EXCLUDED_PROCESSES_ONLY; - state Future testerTimeout = delay(600.0); // wait 600 sec for testers to show up - state std::vector workers; +Future runTests(Reference>> cc, + Reference>> ci, + std::vector tests, + test_location_t at, + int minTestersExpected, + StringRef startingConfiguration, + LocalityData locality, + Optional defaultTenant, + Standalone> tenantsToCreate, + bool restartingTest) { + int flags = (at == TEST_ON_SERVERS ? 0 : GetWorkersRequest::TESTER_CLASS_ONLY) | + GetWorkersRequest::NON_EXCLUDED_PROCESSES_ONLY; + Future testerTimeout = delay(600.0); // wait 600 sec for testers to show up + std::vector workers; loop { - choose { - when(std::vector w = - wait(cc->get().present() - ? brokenPromiseToNever(cc->get().get().getWorkers.getReply(GetWorkersRequest(flags))) - : Never())) { - if (w.size() >= minTestersExpected) { - workers = w; - break; - } - wait(delay(SERVER_KNOBS->WORKER_POLL_DELAY)); - } - when(wait(cc->onChange())) {} - when(wait(testerTimeout)) { - TraceEvent(SevError, "TesterRecruitmentTimeout").log(); - throw timed_out(); - } - } + bool found = false; + co_await Choose() + .When(cc->get().present() + ? brokenPromiseToNever(cc->get().get().getWorkers.getReply(GetWorkersRequest(flags))) + : Never(), + [&workers, &found, minTestersExpected](const std::vector& w) { + if (w.size() >= minTestersExpected) { + workers = w; + found = true; + } + }) + .When(cc->onChange(), [](const Void&) {}) + .When(testerTimeout, + [](const Void&) { + TraceEvent(SevError, "TesterRecruitmentTimeout").log(); + throw timed_out(); + }) + .run(); + + if (found) + break; + co_await delay(SERVER_KNOBS->WORKER_POLL_DELAY); } std::vector ts; @@ -2941,8 +2924,8 @@ ACTOR Future runTests(Reference runTests(Reference runTests(Reference connRecord, - test_type_t whatToRun, - test_location_t at, - int minTestersExpected, - std::string fileName, - StringRef startingConfiguration, - LocalityData locality, - UnitTestParameters testOptions, - Optional defaultTenant, - Standalone> tenantsToCreate, - bool restartingTest) { - state TestSet testSet; - state std::unique_ptr knobProtectiveGroup(nullptr); +Future runTests(const Reference& connRecord, + test_type_t whatToRun, + test_location_t at, + int minTestersExpected, + const std::string& fileName, + StringRef startingConfiguration, + const LocalityData& locality, + const UnitTestParameters& testOptions, + const Optional& defaultTenant, + const Standalone>& tenantsToCreate, + bool restartingTest) { + TestSet testSet; + std::unique_ptr knobProtectiveGroup(nullptr); auto cc = makeReference>>(); auto ci = makeReference>>(); std::vector> actors; @@ -3036,7 +3019,7 @@ ACTOR Future runTests(Reference connRecord, .detail("Reason", "file open failed") .detail("File", fileName.c_str()); fprintf(stderr, "ERROR: Could not open file `%s'\n", fileName.c_str()); - return Void(); + co_return; } enableClientInfoLogging(); // Enable Client Info logging by default for tester if (boost::algorithm::ends_with(fileName, ".txt")) { @@ -3049,7 +3032,7 @@ ACTOR Future runTests(Reference connRecord, TraceEvent(SevError, "TestHarnessFail") .detail("Reason", "unknown tests specification extension") .detail("File", fileName.c_str()); - return Void(); + co_return; } ifs.close(); } @@ -3057,9 +3040,9 @@ ACTOR Future runTests(Reference connRecord, knobProtectiveGroup = std::make_unique(testSet.overrideKnobs); Future tests; if (whatToRun == TEST_TYPE_CONSISTENCY_CHECK_URGENT) { - state Database cx; - state Reference> dbInfo(new AsyncVar); - state Future ccMonitor = monitorServerDBInfo(cc, LocalityData(), dbInfo); // FIXME: locality + Database cx; + Reference> dbInfo(new AsyncVar); + Future ccMonitor = monitorServerDBInfo(cc, LocalityData(), dbInfo); // FIXME: locality cx = openDBOnServer(dbInfo); tests = reportErrors(runConsistencyCheckerUrgentHolder( @@ -3094,28 +3077,26 @@ ACTOR Future runTests(Reference connRecord, "RunTests"); } - choose { - when(wait(tests)) { - return Void(); - } - when(wait(quorum(actors, 1))) { - ASSERT(false); - throw internal_error(); - } - } + co_await Choose() + .When(tests, [](const Void&) {}) + .When(quorum(actors, 1), + [](const Void&) { + ASSERT(false); + throw internal_error(); + }) + .run(); } -namespace { -ACTOR Future testExpectedErrorImpl(Future test, - const char* testDescr, - Optional expectedError, - Optional successFlag, - std::map details, - Optional throwOnError, - UID id) { - state Error actualError; +Future testExpectedError(Future test, + const char* testDescr, + Optional expectedError, + Optional successFlag, + std::map details, + Optional throwOnError, + UID id) { + Error actualError; try { - wait(test); + co_await test; } catch (Error& e) { if (e.code() == error_code_actor_cancelled) { throw e; @@ -3123,7 +3104,7 @@ ACTOR Future testExpectedErrorImpl(Future test, actualError = e; // The test failed as expected if (!expectedError.present() || actualError.code() == expectedError.get().code()) { - return Void(); + co_return; } } @@ -3158,16 +3139,4 @@ ACTOR Future testExpectedErrorImpl(Future test, if (throwOnError.present()) { throw throwOnError.get(); } - return Void(); -} -} // namespace - -Future testExpectedError(Future test, - const char* testDescr, - Optional expectedError, - Optional successFlag, - std::map details, - Optional throwOnError, - UID id) { - return testExpectedErrorImpl(test, testDescr, expectedError, successFlag, details, throwOnError, id); } diff --git a/fdbserver/worker.actor.cpp b/fdbserver/worker.actor.cpp index eb84c489e2b..a9a9d1aa96a 100644 --- a/fdbserver/worker.actor.cpp +++ b/fdbserver/worker.actor.cpp @@ -54,7 +54,7 @@ #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/IKeyValueStore.h" #include "fdbserver/WaitFailure.h" -#include "fdbserver/TesterInterface.actor.h" // for poisson() +#include "fdbserver/TesterInterface.h" // for poisson() #include "fdbserver/IDiskQueue.h" #include "fdbclient/DatabaseContext.h" #include "fdbserver/DataDistributorInterface.h" diff --git a/fdbserver/workloads/AtomicOps.actor.cpp b/fdbserver/workloads/AtomicOps.actor.cpp index aa19001983c..e13b02e9849 100644 --- a/fdbserver/workloads/AtomicOps.actor.cpp +++ b/fdbserver/workloads/AtomicOps.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/AtomicOpsApiCorrectness.actor.cpp b/fdbserver/workloads/AtomicOpsApiCorrectness.actor.cpp index d9cd59528b4..dd271717ebf 100644 --- a/fdbserver/workloads/AtomicOpsApiCorrectness.actor.cpp +++ b/fdbserver/workloads/AtomicOpsApiCorrectness.actor.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbclient/RunRYWTransaction.actor.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/AuthzSecurity.actor.cpp b/fdbserver/workloads/AuthzSecurity.actor.cpp index fccf8a9c136..436817b38d4 100644 --- a/fdbserver/workloads/AuthzSecurity.actor.cpp +++ b/fdbserver/workloads/AuthzSecurity.actor.cpp @@ -32,7 +32,7 @@ #include "fdbclient/FDBOptions.g.h" #include "fdbserver/LogSystemConfig.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/TLogInterface.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp b/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp index b405cf20f3e..bd6c1ae8c97 100644 --- a/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp +++ b/fdbserver/workloads/AutomaticIdempotencyWorkload.actor.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbclient/RunRYWTransaction.actor.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/BackgroundSelectors.actor.cpp b/fdbserver/workloads/BackgroundSelectors.actor.cpp index be2efb2fa78..b499cc1f2e6 100644 --- a/fdbserver/workloads/BackgroundSelectors.actor.cpp +++ b/fdbserver/workloads/BackgroundSelectors.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/BlobGranuleCorrectnessWorkload.actor.cpp b/fdbserver/workloads/BlobGranuleCorrectnessWorkload.actor.cpp index 9cfe81c9ce0..665eb3f4636 100644 --- a/fdbserver/workloads/BlobGranuleCorrectnessWorkload.actor.cpp +++ b/fdbserver/workloads/BlobGranuleCorrectnessWorkload.actor.cpp @@ -34,7 +34,7 @@ #include "fdbserver/BlobGranuleServerCommon.actor.h" #include "fdbserver/BlobGranuleValidation.actor.h" #include "fdbserver/Knobs.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/Arena.h" #include "flow/IRandom.h" diff --git a/fdbserver/workloads/BlobGranuleRangesWorkload.actor.cpp b/fdbserver/workloads/BlobGranuleRangesWorkload.actor.cpp index 0bfa7c422c2..1c84791b6cd 100644 --- a/fdbserver/workloads/BlobGranuleRangesWorkload.actor.cpp +++ b/fdbserver/workloads/BlobGranuleRangesWorkload.actor.cpp @@ -24,7 +24,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/SystemData.h" #include "fdbclient/TenantManagement.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/Arena.h" diff --git a/fdbserver/workloads/BlobGranuleVerifier.actor.cpp b/fdbserver/workloads/BlobGranuleVerifier.actor.cpp index 0baa94d1841..938ec884f20 100644 --- a/fdbserver/workloads/BlobGranuleVerifier.actor.cpp +++ b/fdbserver/workloads/BlobGranuleVerifier.actor.cpp @@ -31,7 +31,7 @@ #include "fdbserver/BlobGranuleValidation.actor.h" #include "fdbserver/BlobGranuleServerCommon.actor.h" #include "fdbserver/Knobs.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/QuietDatabase.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/Error.h" diff --git a/fdbserver/workloads/BulkLoad.actor.cpp b/fdbserver/workloads/BulkLoad.actor.cpp index 0e38fb09feb..68a8f9c94ee 100644 --- a/fdbserver/workloads/BulkLoad.actor.cpp +++ b/fdbserver/workloads/BulkLoad.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/BulkLoadWithTenants.actor.cpp b/fdbserver/workloads/BulkLoadWithTenants.actor.cpp index c346cc0e2a0..2832aad6d5c 100644 --- a/fdbserver/workloads/BulkLoadWithTenants.actor.cpp +++ b/fdbserver/workloads/BulkLoadWithTenants.actor.cpp @@ -24,7 +24,7 @@ #include "fdbrpc/ContinuousSample.h" #include "fdbrpc/TenantInfo.h" #include "fdbserver/Knobs.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/genericactors.actor.h" diff --git a/fdbserver/workloads/Cache.actor.cpp b/fdbserver/workloads/Cache.actor.cpp index 57c7056006e..78aa743825d 100644 --- a/fdbserver/workloads/Cache.actor.cpp +++ b/fdbserver/workloads/Cache.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/ManagementAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/ChangeConfig.actor.cpp b/fdbserver/workloads/ChangeConfig.actor.cpp index e183d3cd82f..60bb03021a5 100644 --- a/fdbserver/workloads/ChangeConfig.actor.cpp +++ b/fdbserver/workloads/ChangeConfig.actor.cpp @@ -21,7 +21,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/ClusterConnectionMemoryRecord.h" #include "fdbclient/ClusterInterface.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ManagementAPI.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" diff --git a/fdbserver/workloads/ChangeFeedOperations.actor.cpp b/fdbserver/workloads/ChangeFeedOperations.actor.cpp index ba3a6778481..6fd727dc7ce 100644 --- a/fdbserver/workloads/ChangeFeedOperations.actor.cpp +++ b/fdbserver/workloads/ChangeFeedOperations.actor.cpp @@ -22,7 +22,7 @@ #include "fdbclient/ManagementAPI.actor.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/SystemData.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/Arena.h" diff --git a/fdbserver/workloads/ChangeFeeds.actor.cpp b/fdbserver/workloads/ChangeFeeds.actor.cpp index cab3221b032..f29cd9039f9 100644 --- a/fdbserver/workloads/ChangeFeeds.actor.cpp +++ b/fdbserver/workloads/ChangeFeeds.actor.cpp @@ -22,7 +22,7 @@ #include "fdbclient/ManagementAPI.actor.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/SystemData.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/Arena.h" diff --git a/fdbserver/workloads/ClearSingleRange.actor.cpp b/fdbserver/workloads/ClearSingleRange.actor.cpp index b4fe87341d6..7d562412ce5 100644 --- a/fdbserver/workloads/ClearSingleRange.actor.cpp +++ b/fdbserver/workloads/ClearSingleRange.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/ClogSingleConnection.actor.cpp b/fdbserver/workloads/ClogSingleConnection.actor.cpp index 4d8a64d4159..2c71b515aa1 100644 --- a/fdbserver/workloads/ClogSingleConnection.actor.cpp +++ b/fdbserver/workloads/ClogSingleConnection.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/SimulatorProcessInfo.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/ClogTlog.actor.cpp b/fdbserver/workloads/ClogTlog.actor.cpp index 76a28f28a35..563400e416b 100644 --- a/fdbserver/workloads/ClogTlog.actor.cpp +++ b/fdbserver/workloads/ClogTlog.actor.cpp @@ -25,7 +25,7 @@ #include "fdbrpc/SimulatorProcessInfo.h" #include "fdbserver/RecoveryState.h" #include "fdbserver/ServerDBInfo.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "flow/CodeProbe.h" diff --git a/fdbserver/workloads/CommitBugCheck.actor.cpp b/fdbserver/workloads/CommitBugCheck.actor.cpp index b71b5c28c38..963df0ee05f 100644 --- a/fdbserver/workloads/CommitBugCheck.actor.cpp +++ b/fdbserver/workloads/CommitBugCheck.actor.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/ConfigureDatabase.actor.cpp b/fdbserver/workloads/ConfigureDatabase.actor.cpp index d9e0d6cb0f4..cf2becc59c7 100644 --- a/fdbserver/workloads/ConfigureDatabase.actor.cpp +++ b/fdbserver/workloads/ConfigureDatabase.actor.cpp @@ -22,7 +22,7 @@ #include "fdbclient/FDBTypes.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ManagementAPI.actor.h" #include "fdbclient/RunRYWTransaction.actor.h" #include "fdbserver/Knobs.h" diff --git a/fdbserver/workloads/ConflictRange.actor.cpp b/fdbserver/workloads/ConflictRange.actor.cpp index a083f473b56..cce3cf05abc 100644 --- a/fdbserver/workloads/ConflictRange.actor.cpp +++ b/fdbserver/workloads/ConflictRange.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbclient/ManagementAPI.actor.h" diff --git a/fdbserver/workloads/ConsistencyCheck.actor.cpp b/fdbserver/workloads/ConsistencyCheck.actor.cpp index 8b7725cd5f1..3b4d45f53c2 100644 --- a/fdbserver/workloads/ConsistencyCheck.actor.cpp +++ b/fdbserver/workloads/ConsistencyCheck.actor.cpp @@ -25,7 +25,7 @@ #include "flow/ProcessEvents.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/FDBTypes.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/IRateControl.h" #include "fdbrpc/simulator.h" diff --git a/fdbserver/workloads/ConsistencyCheckUrgent.actor.cpp b/fdbserver/workloads/ConsistencyCheckUrgent.actor.cpp index ba591c8a762..cfbb66ae3f8 100644 --- a/fdbserver/workloads/ConsistencyCheckUrgent.actor.cpp +++ b/fdbserver/workloads/ConsistencyCheckUrgent.actor.cpp @@ -25,7 +25,7 @@ #include "flow/ProcessEvents.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/FDBTypes.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/IRateControl.h" #include "fdbrpc/simulator.h" diff --git a/fdbserver/workloads/CpuProfiler.actor.cpp b/fdbserver/workloads/CpuProfiler.actor.cpp index 4e07329e9de..81ab57c76c8 100644 --- a/fdbserver/workloads/CpuProfiler.actor.cpp +++ b/fdbserver/workloads/CpuProfiler.actor.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/QuietDatabase.h" #include "fdbserver/ServerDBInfo.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/Cycle.actor.cpp b/fdbserver/workloads/Cycle.actor.cpp index ad4f2c4c282..c0515259e69 100644 --- a/fdbserver/workloads/Cycle.actor.cpp +++ b/fdbserver/workloads/Cycle.actor.cpp @@ -28,7 +28,7 @@ #include "fdbrpc/TenantInfo.h" #include "fdbclient/FDBOptions.g.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" diff --git a/fdbserver/workloads/DDBalance.actor.cpp b/fdbserver/workloads/DDBalance.actor.cpp index 13b8ffb3b4b..3d37db79a15 100644 --- a/fdbserver/workloads/DDBalance.actor.cpp +++ b/fdbserver/workloads/DDBalance.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/DDMetrics.actor.cpp b/fdbserver/workloads/DDMetrics.actor.cpp index d8d2b53140d..0fb8d192d9d 100644 --- a/fdbserver/workloads/DDMetrics.actor.cpp +++ b/fdbserver/workloads/DDMetrics.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/Status.actor.h" #include "fdbserver/QuietDatabase.h" #include "fdbserver/ServerDBInfo.h" diff --git a/fdbserver/workloads/DcLag.actor.cpp b/fdbserver/workloads/DcLag.actor.cpp index a7979c9497f..c43908d656c 100644 --- a/fdbserver/workloads/DcLag.actor.cpp +++ b/fdbserver/workloads/DcLag.actor.cpp @@ -25,7 +25,7 @@ #include "fdbserver/Knobs.h" #include "fdbserver/RecoveryState.h" #include "fdbserver/ServerDBInfo.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "flow/CodeProbe.h" diff --git a/fdbserver/workloads/DiskFailureInjection.actor.cpp b/fdbserver/workloads/DiskFailureInjection.actor.cpp index 2e28b1e6f35..630e4921a10 100644 --- a/fdbserver/workloads/DiskFailureInjection.actor.cpp +++ b/fdbserver/workloads/DiskFailureInjection.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "fdbserver/WorkerInterface.actor.h" diff --git a/fdbserver/workloads/ExcludeIncludeStorageServersWorkload.actor.cpp b/fdbserver/workloads/ExcludeIncludeStorageServersWorkload.actor.cpp index 91c2db07b86..2acf31f574b 100644 --- a/fdbserver/workloads/ExcludeIncludeStorageServersWorkload.actor.cpp +++ b/fdbserver/workloads/ExcludeIncludeStorageServersWorkload.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" diff --git a/fdbserver/workloads/FailoverWithSSLag.actor.cpp b/fdbserver/workloads/FailoverWithSSLag.actor.cpp index 12022cf5c75..01d090fdafc 100644 --- a/fdbserver/workloads/FailoverWithSSLag.actor.cpp +++ b/fdbserver/workloads/FailoverWithSSLag.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/Knobs.h" diff --git a/fdbserver/workloads/FastTriggeredWatches.actor.cpp b/fdbserver/workloads/FastTriggeredWatches.actor.cpp index 736891d132d..570a5bb2520 100644 --- a/fdbserver/workloads/FastTriggeredWatches.actor.cpp +++ b/fdbserver/workloads/FastTriggeredWatches.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/Knobs.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/FileSystem.actor.cpp b/fdbserver/workloads/FileSystem.actor.cpp index f656dc75a53..a2005eb1883 100644 --- a/fdbserver/workloads/FileSystem.actor.cpp +++ b/fdbserver/workloads/FileSystem.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/FuzzApiCorrectness.actor.cpp b/fdbserver/workloads/FuzzApiCorrectness.actor.cpp index 6d944d90986..e2ad593d337 100644 --- a/fdbserver/workloads/FuzzApiCorrectness.actor.cpp +++ b/fdbserver/workloads/FuzzApiCorrectness.actor.cpp @@ -27,7 +27,7 @@ #include "fdbclient/FDBTypes.h" #include "fdbclient/ManagementAPI.actor.h" #include "fdbserver/Knobs.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/GenericManagementAPI.actor.h" #include "fdbclient/TenantManagement.actor.h" #include "fdbclient/ThreadSafeTransaction.h" diff --git a/fdbserver/workloads/GcGenerations.actor.cpp b/fdbserver/workloads/GcGenerations.actor.cpp index 07327d574db..ffc618cf323 100644 --- a/fdbserver/workloads/GcGenerations.actor.cpp +++ b/fdbserver/workloads/GcGenerations.actor.cpp @@ -26,7 +26,7 @@ #include "fdbserver/Knobs.h" #include "fdbserver/RecoveryState.h" #include "fdbserver/ServerDBInfo.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "flow/CodeProbe.h" diff --git a/fdbserver/workloads/GetRangeStream.actor.cpp b/fdbserver/workloads/GetRangeStream.actor.cpp index cef58ce6eca..a773b64a343 100644 --- a/fdbserver/workloads/GetRangeStream.actor.cpp +++ b/fdbserver/workloads/GetRangeStream.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/HealthMetricsApi.actor.cpp b/fdbserver/workloads/HealthMetricsApi.actor.cpp index 6ae2f80bc4e..3fdd7d25ec7 100644 --- a/fdbserver/workloads/HealthMetricsApi.actor.cpp +++ b/fdbserver/workloads/HealthMetricsApi.actor.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/WorkerInterface.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/HighContentionPrefixAllocatorWorkload.actor.cpp b/fdbserver/workloads/HighContentionPrefixAllocatorWorkload.actor.cpp index f793542de9f..0b01b9ac22f 100644 --- a/fdbserver/workloads/HighContentionPrefixAllocatorWorkload.actor.cpp +++ b/fdbserver/workloads/HighContentionPrefixAllocatorWorkload.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/HighContentionPrefixAllocator.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/Increment.actor.cpp b/fdbserver/workloads/Increment.actor.cpp index db7c89d2474..efe5d653376 100644 --- a/fdbserver/workloads/Increment.actor.cpp +++ b/fdbserver/workloads/Increment.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/IndexScan.actor.cpp b/fdbserver/workloads/IndexScan.actor.cpp index 71a3f1c9a22..208f148c16f 100644 --- a/fdbserver/workloads/IndexScan.actor.cpp +++ b/fdbserver/workloads/IndexScan.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" diff --git a/fdbserver/workloads/Inventory.actor.cpp b/fdbserver/workloads/Inventory.actor.cpp index 7aee68a5ee6..bf319cb7920 100644 --- a/fdbserver/workloads/Inventory.actor.cpp +++ b/fdbserver/workloads/Inventory.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/KillRegion.actor.cpp b/fdbserver/workloads/KillRegion.actor.cpp index f322744327f..0706299f864 100644 --- a/fdbserver/workloads/KillRegion.actor.cpp +++ b/fdbserver/workloads/KillRegion.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/RecoveryState.h" diff --git a/fdbserver/workloads/LockDatabase.actor.cpp b/fdbserver/workloads/LockDatabase.actor.cpp index f81cbe47ed8..2f31d7590d5 100644 --- a/fdbserver/workloads/LockDatabase.actor.cpp +++ b/fdbserver/workloads/LockDatabase.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/FDBOptions.g.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbclient/ManagementAPI.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/LockDatabaseFrequently.actor.cpp b/fdbserver/workloads/LockDatabaseFrequently.actor.cpp index 991e4770369..1900cd7a2cd 100644 --- a/fdbserver/workloads/LockDatabaseFrequently.actor.cpp +++ b/fdbserver/workloads/LockDatabaseFrequently.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbclient/ManagementAPI.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/LogMetrics.actor.cpp b/fdbserver/workloads/LogMetrics.actor.cpp index d79fb4b11d3..e27f23fcf9b 100644 --- a/fdbserver/workloads/LogMetrics.actor.cpp +++ b/fdbserver/workloads/LogMetrics.actor.cpp @@ -20,7 +20,7 @@ #include "flow/SystemMonitor.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "fdbserver/MasterInterface.h" diff --git a/fdbserver/workloads/LowLatency.actor.cpp b/fdbserver/workloads/LowLatency.actor.cpp index 6bc2a2335c6..a3dd145b452 100644 --- a/fdbserver/workloads/LowLatency.actor.cpp +++ b/fdbserver/workloads/LowLatency.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/IKnobCollection.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/Knobs.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/MachineAttrition.actor.cpp b/fdbserver/workloads/MachineAttrition.actor.cpp index 8dd839bd4bf..8e756382b97 100644 --- a/fdbserver/workloads/MachineAttrition.actor.cpp +++ b/fdbserver/workloads/MachineAttrition.actor.cpp @@ -21,7 +21,7 @@ #include "fdbclient/FDBOptions.g.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/CoordinationInterface.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" diff --git a/fdbserver/workloads/Mako.actor.cpp b/fdbserver/workloads/Mako.actor.cpp index 334ca4db937..feb82187e03 100644 --- a/fdbserver/workloads/Mako.actor.cpp +++ b/fdbserver/workloads/Mako.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" diff --git a/fdbserver/workloads/MemoryLifetime.actor.cpp b/fdbserver/workloads/MemoryLifetime.actor.cpp index 1d6416c6840..deb83c11850 100644 --- a/fdbserver/workloads/MemoryLifetime.actor.cpp +++ b/fdbserver/workloads/MemoryLifetime.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "flow/DeterministicRandom.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" diff --git a/fdbserver/workloads/MetricLogging.actor.cpp b/fdbserver/workloads/MetricLogging.actor.cpp index 35fda6650b2..b35235de242 100644 --- a/fdbserver/workloads/MetricLogging.actor.cpp +++ b/fdbserver/workloads/MetricLogging.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "flow/TDMetric.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/MiniCycle.actor.cpp b/fdbserver/workloads/MiniCycle.actor.cpp index d27cd00c2a8..a3e4bb1c3ab 100644 --- a/fdbserver/workloads/MiniCycle.actor.cpp +++ b/fdbserver/workloads/MiniCycle.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/FDBOptions.g.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/Arena.h" diff --git a/fdbserver/workloads/Performance.actor.cpp b/fdbserver/workloads/Performance.actor.cpp index ef491d8a709..59c5f9c0e9a 100644 --- a/fdbserver/workloads/Performance.actor.cpp +++ b/fdbserver/workloads/Performance.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/QuietDatabase.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/Ping.actor.cpp b/fdbserver/workloads/Ping.actor.cpp index 2e05c389d97..dfdadd9c88f 100644 --- a/fdbserver/workloads/Ping.actor.cpp +++ b/fdbserver/workloads/Ping.actor.cpp @@ -20,7 +20,7 @@ #include "flow/ActorCollection.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/QuietDatabase.h" diff --git a/fdbserver/workloads/PubSubMultiples.actor.cpp b/fdbserver/workloads/PubSubMultiples.actor.cpp index bfecc7f77f2..f88cd0ed10b 100644 --- a/fdbserver/workloads/PubSubMultiples.actor.cpp +++ b/fdbserver/workloads/PubSubMultiples.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbserver/pubsub.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/QueuePush.actor.cpp b/fdbserver/workloads/QueuePush.actor.cpp index a17fe6127dd..06e7de8fb98 100644 --- a/fdbserver/workloads/QueuePush.actor.cpp +++ b/fdbserver/workloads/QueuePush.actor.cpp @@ -21,7 +21,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/RYWDisable.actor.cpp b/fdbserver/workloads/RYWDisable.actor.cpp index 39808c04170..11ce25eb38f 100644 --- a/fdbserver/workloads/RYWDisable.actor.cpp +++ b/fdbserver/workloads/RYWDisable.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/RYWPerformance.actor.cpp b/fdbserver/workloads/RYWPerformance.actor.cpp index e35455b7061..3f274b9deb9 100644 --- a/fdbserver/workloads/RYWPerformance.actor.cpp +++ b/fdbserver/workloads/RYWPerformance.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/RandomClogging.actor.cpp b/fdbserver/workloads/RandomClogging.actor.cpp index eb5e4544d6d..e1a592b7b41 100644 --- a/fdbserver/workloads/RandomClogging.actor.cpp +++ b/fdbserver/workloads/RandomClogging.actor.cpp @@ -22,7 +22,7 @@ #include "fdbrpc/simulator.h" #include "fdbrpc/SimulatorProcessInfo.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/RandomSelector.actor.cpp b/fdbserver/workloads/RandomSelector.actor.cpp index b5d29926dc8..8f4511ab5a6 100644 --- a/fdbserver/workloads/RandomSelector.actor.cpp +++ b/fdbserver/workloads/RandomSelector.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/ReadHotDetection.actor.cpp b/fdbserver/workloads/ReadHotDetection.actor.cpp index a799be92be9..cea5ea70374 100644 --- a/fdbserver/workloads/ReadHotDetection.actor.cpp +++ b/fdbserver/workloads/ReadHotDetection.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/ReadWrite.actor.cpp b/fdbserver/workloads/ReadWrite.actor.cpp index d709bf899ca..135cd118f93 100644 --- a/fdbserver/workloads/ReadWrite.actor.cpp +++ b/fdbserver/workloads/ReadWrite.actor.cpp @@ -25,7 +25,7 @@ #include "fdbclient/FDBTypes.h" #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" diff --git a/fdbserver/workloads/RemoveServersSafely.actor.cpp b/fdbserver/workloads/RemoveServersSafely.actor.cpp index 7efdecf0bec..e2ae90423e0 100644 --- a/fdbserver/workloads/RemoveServersSafely.actor.cpp +++ b/fdbserver/workloads/RemoveServersSafely.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" diff --git a/fdbserver/workloads/ReportConflictingKeys.actor.cpp b/fdbserver/workloads/ReportConflictingKeys.actor.cpp index 0c93e775316..0936d77e423 100644 --- a/fdbserver/workloads/ReportConflictingKeys.actor.cpp +++ b/fdbserver/workloads/ReportConflictingKeys.actor.cpp @@ -21,7 +21,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/ReadYourWrites.h" #include "fdbclient/SystemData.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/Rollback.actor.cpp b/fdbserver/workloads/Rollback.actor.cpp index 41c036c63e8..6bf8b65f264 100644 --- a/fdbserver/workloads/Rollback.actor.cpp +++ b/fdbserver/workloads/Rollback.actor.cpp @@ -20,7 +20,7 @@ #include "flow/DeterministicRandom.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "fdbserver/MasterInterface.h" diff --git a/fdbserver/workloads/RyowCorrectness.actor.cpp b/fdbserver/workloads/RyowCorrectness.actor.cpp index 2c115cb17cc..6bb563e7d70 100644 --- a/fdbserver/workloads/RyowCorrectness.actor.cpp +++ b/fdbserver/workloads/RyowCorrectness.actor.cpp @@ -20,7 +20,7 @@ #include -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/MemoryKeyValueStore.h" #include "fdbserver/workloads/ApiWorkload.h" diff --git a/fdbserver/workloads/SaveAndKill.actor.cpp b/fdbserver/workloads/SaveAndKill.actor.cpp index 3bdfedcf43a..b93069e0999 100644 --- a/fdbserver/workloads/SaveAndKill.actor.cpp +++ b/fdbserver/workloads/SaveAndKill.actor.cpp @@ -22,7 +22,7 @@ #include "fdbclient/ManagementAPI.actor.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbserver/Knobs.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "flow/Knobs.h" diff --git a/fdbserver/workloads/SelectorCorrectness.actor.cpp b/fdbserver/workloads/SelectorCorrectness.actor.cpp index cf71c731cb1..17b6a60f55e 100644 --- a/fdbserver/workloads/SelectorCorrectness.actor.cpp +++ b/fdbserver/workloads/SelectorCorrectness.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/Serializability.actor.cpp b/fdbserver/workloads/Serializability.actor.cpp index c96f4b81270..69dee112839 100644 --- a/fdbserver/workloads/Serializability.actor.cpp +++ b/fdbserver/workloads/Serializability.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "flow/ActorCollection.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/Sideband.actor.cpp b/fdbserver/workloads/Sideband.actor.cpp index e9e08dc994f..6cefe822b93 100644 --- a/fdbserver/workloads/Sideband.actor.cpp +++ b/fdbserver/workloads/Sideband.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/SidebandSingle.actor.cpp b/fdbserver/workloads/SidebandSingle.actor.cpp index c1295c49c2f..2f91020517c 100644 --- a/fdbserver/workloads/SidebandSingle.actor.cpp +++ b/fdbserver/workloads/SidebandSingle.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/Knobs.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/SkewedReadWrite.actor.cpp b/fdbserver/workloads/SkewedReadWrite.actor.cpp index 64c3138a510..3a6d71efcd7 100644 --- a/fdbserver/workloads/SkewedReadWrite.actor.cpp +++ b/fdbserver/workloads/SkewedReadWrite.actor.cpp @@ -24,7 +24,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" diff --git a/fdbserver/workloads/SnapTest.actor.cpp b/fdbserver/workloads/SnapTest.actor.cpp index ae910a831d3..056d999cb68 100644 --- a/fdbserver/workloads/SnapTest.actor.cpp +++ b/fdbserver/workloads/SnapTest.actor.cpp @@ -26,7 +26,7 @@ #include "fdbclient/SimpleIni.h" #include "fdbserver/Knobs.h" #include "fdbserver/Status.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/SpecialKeySpaceCorrectness.actor.cpp b/fdbserver/workloads/SpecialKeySpaceCorrectness.actor.cpp index 40805d6ae9e..2ec32840a10 100644 --- a/fdbserver/workloads/SpecialKeySpaceCorrectness.actor.cpp +++ b/fdbserver/workloads/SpecialKeySpaceCorrectness.actor.cpp @@ -29,7 +29,7 @@ #include "fdbclient/SpecialKeySpace.actor.h" #include "fdbserver/Knobs.h" #include "fdbclient/TenantManagement.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/IRandom.h" #include "flow/actorcompiler.h" diff --git a/fdbserver/workloads/StatusWorkload.actor.cpp b/fdbserver/workloads/StatusWorkload.actor.cpp index 2aa51f18e83..11868a012fc 100644 --- a/fdbserver/workloads/StatusWorkload.actor.cpp +++ b/fdbserver/workloads/StatusWorkload.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbclient/StatusClient.h" #include "flow/UnitTest.h" diff --git a/fdbserver/workloads/Storefront.actor.cpp b/fdbserver/workloads/Storefront.actor.cpp index 13ebb76abdc..ee05246681f 100644 --- a/fdbserver/workloads/Storefront.actor.cpp +++ b/fdbserver/workloads/Storefront.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/StreamingRangeRead.actor.cpp b/fdbserver/workloads/StreamingRangeRead.actor.cpp index d20bc854d68..591db612ac1 100644 --- a/fdbserver/workloads/StreamingRangeRead.actor.cpp +++ b/fdbserver/workloads/StreamingRangeRead.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/FDBOptions.g.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/Arena.h" diff --git a/fdbserver/workloads/StreamingRead.actor.cpp b/fdbserver/workloads/StreamingRead.actor.cpp index f37fbaac45f..66ca918c0f5 100644 --- a/fdbserver/workloads/StreamingRead.actor.cpp +++ b/fdbserver/workloads/StreamingRead.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/TagThrottleApi.actor.cpp b/fdbserver/workloads/TagThrottleApi.actor.cpp index 9314c2e4360..459841683fe 100644 --- a/fdbserver/workloads/TagThrottleApi.actor.cpp +++ b/fdbserver/workloads/TagThrottleApi.actor.cpp @@ -21,7 +21,7 @@ #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/TagThrottle.actor.h" #include "fdbserver/Knobs.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/TargetedKill.actor.cpp b/fdbserver/workloads/TargetedKill.actor.cpp index 9f481e720e5..0e9bdc4d3a1 100644 --- a/fdbserver/workloads/TargetedKill.actor.cpp +++ b/fdbserver/workloads/TargetedKill.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbrpc/simulator.h" #include "fdbserver/MasterInterface.h" diff --git a/fdbserver/workloads/ThreadSafety.actor.cpp b/fdbserver/workloads/ThreadSafety.actor.cpp index cb23cbc5024..0ab9d4771cf 100644 --- a/fdbserver/workloads/ThreadSafety.actor.cpp +++ b/fdbserver/workloads/ThreadSafety.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/simulator.h" #include "flow/DeterministicRandom.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/ServerDBInfo.h" #include "fdbclient/ThreadSafeTransaction.h" #include "fdbclient/MultiVersionTransaction.h" diff --git a/fdbserver/workloads/Throughput.actor.cpp b/fdbserver/workloads/Throughput.actor.cpp index 703ba05d68d..be4693d0369 100644 --- a/fdbserver/workloads/Throughput.actor.cpp +++ b/fdbserver/workloads/Throughput.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/ActorCollection.h" diff --git a/fdbserver/workloads/UnitPerf.actor.cpp b/fdbserver/workloads/UnitPerf.actor.cpp index 184bf14d49a..53d8bf91139 100644 --- a/fdbserver/workloads/UnitPerf.actor.cpp +++ b/fdbserver/workloads/UnitPerf.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbrpc/ActorFuzz.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // has to be last include diff --git a/fdbserver/workloads/Unreadable.actor.cpp b/fdbserver/workloads/Unreadable.actor.cpp index 484bee0c5bc..c2f7aaa5132 100644 --- a/fdbserver/workloads/Unreadable.actor.cpp +++ b/fdbserver/workloads/Unreadable.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/VersionStamp.actor.cpp b/fdbserver/workloads/VersionStamp.actor.cpp index e75190b43bb..d33ca4f641d 100644 --- a/fdbserver/workloads/VersionStamp.actor.cpp +++ b/fdbserver/workloads/VersionStamp.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/ClusterConnectionMemoryRecord.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/WatchAndWait.actor.cpp b/fdbserver/workloads/WatchAndWait.actor.cpp index a56a805bd8b..a4218f526a1 100644 --- a/fdbserver/workloads/WatchAndWait.actor.cpp +++ b/fdbserver/workloads/WatchAndWait.actor.cpp @@ -19,7 +19,7 @@ */ #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbclient/ReadYourWrites.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/Watches.actor.cpp b/fdbserver/workloads/Watches.actor.cpp index 45a36189859..04a399bc5a3 100644 --- a/fdbserver/workloads/Watches.actor.cpp +++ b/fdbserver/workloads/Watches.actor.cpp @@ -20,7 +20,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "flow/CodeProbe.h" #include "flow/Coroutines.h" #include "flow/DeterministicRandom.h" diff --git a/fdbserver/workloads/WatchesSameKeyCorrectness.actor.cpp b/fdbserver/workloads/WatchesSameKeyCorrectness.actor.cpp index 714c6a45cb5..7187b3b2bc8 100644 --- a/fdbserver/workloads/WatchesSameKeyCorrectness.actor.cpp +++ b/fdbserver/workloads/WatchesSameKeyCorrectness.actor.cpp @@ -20,7 +20,7 @@ #include "fdbclient/ReadYourWrites.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "flow/DeterministicRandom.h" #include "fdbserver/workloads/workloads.actor.h" #include "flow/actorcompiler.h" // This must be the last #include. diff --git a/fdbserver/workloads/WorkerErrors.actor.cpp b/fdbserver/workloads/WorkerErrors.actor.cpp index f6a0b1e2ee7..e1d6b322832 100644 --- a/fdbserver/workloads/WorkerErrors.actor.cpp +++ b/fdbserver/workloads/WorkerErrors.actor.cpp @@ -20,7 +20,7 @@ #include "flow/ActorCollection.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/QuietDatabase.h" diff --git a/fdbserver/workloads/WriteBandwidth.actor.cpp b/fdbserver/workloads/WriteBandwidth.actor.cpp index e76d7fd58d3..f97820a06e4 100644 --- a/fdbserver/workloads/WriteBandwidth.actor.cpp +++ b/fdbserver/workloads/WriteBandwidth.actor.cpp @@ -22,7 +22,7 @@ #include "fdbrpc/DDSketch.h" #include "fdbclient/NativeAPI.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/WorkerInterface.actor.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" diff --git a/fdbserver/workloads/WriteDuringRead.actor.cpp b/fdbserver/workloads/WriteDuringRead.actor.cpp index ac2df3b8e28..bd79acbfd89 100644 --- a/fdbserver/workloads/WriteDuringRead.actor.cpp +++ b/fdbserver/workloads/WriteDuringRead.actor.cpp @@ -22,7 +22,7 @@ #include "fdbclient/ManagementAPI.actor.h" #include "fdbclient/NativeAPI.actor.h" #include "fdbclient/TenantManagement.actor.h" -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbclient/ReadYourWrites.h" #include "flow/ActorCollection.h" #include "fdbserver/workloads/workloads.actor.h" diff --git a/fdbserver/workloads/WriteTagThrottling.actor.cpp b/fdbserver/workloads/WriteTagThrottling.actor.cpp index 51839f6e8fd..2c308117eb8 100644 --- a/fdbserver/workloads/WriteTagThrottling.actor.cpp +++ b/fdbserver/workloads/WriteTagThrottling.actor.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ -#include "fdbserver/TesterInterface.actor.h" +#include "fdbserver/TesterInterface.h" #include "fdbserver/workloads/workloads.actor.h" #include "fdbserver/workloads/BulkSetup.actor.h" #include "fdbserver/WorkerInterface.actor.h" diff --git a/flowbench/BenchCallback.actor.cpp b/flowbench/BenchCallback.actor.cpp index decfb69115f..348bdefa9ac 100644 --- a/flowbench/BenchCallback.actor.cpp +++ b/flowbench/BenchCallback.actor.cpp @@ -30,9 +30,10 @@ ACTOR template static Future increment(Future f, uint32_t* sum) { - state std::array arr; + // commented out to avoid counting the memory allocation in the benchmark + // state std::array arr; wait(f); - benchmark::DoNotOptimize(arr); + // benchmark::DoNotOptimize(arr); ++(*sum); return Void(); } @@ -59,10 +60,10 @@ static Future benchCallbackActor(benchmark::State* benchState) { } template -static void bench_callback(benchmark::State& benchState) { +static void actor_callback(benchmark::State& benchState) { onMainThread([&benchState]() { return benchCallbackActor(&benchState); }).blockUntilReady(); } -BENCHMARK_TEMPLATE(bench_callback, 1)->Range(1, 1 << 8)->ReportAggregatesOnly(true); -BENCHMARK_TEMPLATE(bench_callback, 32)->Range(1, 1 << 8)->ReportAggregatesOnly(true); -BENCHMARK_TEMPLATE(bench_callback, 1024)->Range(1, 1 << 8)->ReportAggregatesOnly(true); +BENCHMARK_TEMPLATE(actor_callback, 1)->Range(1, 1 << 8)->ReportAggregatesOnly(true); +// BENCHMARK_TEMPLATE(actor_callback, 32)->Range(1, 1 << 8)->ReportAggregatesOnly(true); +// BENCHMARK_TEMPLATE(actor_callback, 1024)->Range(1, 1 << 8)->ReportAggregatesOnly(true); diff --git a/flowbench/BenchCallback.cpp b/flowbench/BenchCallback.cpp new file mode 100644 index 00000000000..bce09efdec3 --- /dev/null +++ b/flowbench/BenchCallback.cpp @@ -0,0 +1,66 @@ +/* + * BenchCallback.cpp + * + * This source file is part of the FoundationDB open source project + * + * Copyright 2013-2024 Apple Inc. and the FoundationDB project authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "benchmark/benchmark.h" + +#include + +#include "fdbclient/FDBTypes.h" +#include "flow/flow.h" +#include "flow/Coroutines.h" +#include "flow/ThreadHelper.actor.h" + +template +static Future increment(Future f, uint32_t* sum) { + // commented out to avoid counting the memory allocation in the benchmark + // std::array arr; + co_await f; + // benchmark::DoNotOptimize(arr); + ++(*sum); +} + +template +static Future benchCallbackCoroutine(benchmark::State* benchState) { + size_t actorCount = benchState->range(0); + uint32_t sum; + while (benchState->KeepRunning()) { + sum = 0; + Promise trigger; + std::vector> futures; + futures.reserve(actorCount); + for (int i = 0; i < actorCount; ++i) { + futures.push_back(increment(trigger.getFuture(), &sum)); + } + trigger.send(Void()); + co_await waitForAll(futures); + benchmark::DoNotOptimize(sum); + } + benchState->SetItemsProcessed(actorCount * static_cast(benchState->iterations())); + benchState->SetBytesProcessed(actorCount * Size * static_cast(benchState->iterations())); +} + +template +static void coroutine_callback(benchmark::State& benchState) { + onMainThread([&benchState]() { return benchCallbackCoroutine(&benchState); }).blockUntilReady(); +} + +BENCHMARK_TEMPLATE(coroutine_callback, 1)->Range(1, 1 << 8)->ReportAggregatesOnly(true); +// BENCHMARK_TEMPLATE(coroutine_callback, 32)->Range(1, 1 << 8)->ReportAggregatesOnly(true); +// BENCHMARK_TEMPLATE(coroutine_callback, 1024)->Range(1, 1 << 8)->ReportAggregatesOnly(true); diff --git a/flowbench/BenchNet2.cpp b/flowbench/BenchNet2.cpp new file mode 100644 index 00000000000..310a0f018aa --- /dev/null +++ b/flowbench/BenchNet2.cpp @@ -0,0 +1,90 @@ +/* + * BenchNet2.cpp + * + * This source file is part of the FoundationDB open source project + * + * Copyright 2013-2024 Apple Inc. and the FoundationDB project authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "benchmark/benchmark.h" + +#include "flow/IRandom.h" +#include "flow/flow.h" +#include "flow/DeterministicRandom.h" +#include "flow/network.h" +#include "flow/ThreadHelper.actor.h" + +#include "flow/actorcompiler.h" // This must be the last #include. + +static Future increment(TaskPriority priority, uint32_t* sum) { + co_await delay(0, priority); + ++(*sum); +} + +static inline TaskPriority getRandomTaskPriority(DeterministicRandom& rand) { + return static_cast(rand.randomInt(0, 100)); +} + +static Future benchNet2Actor(benchmark::State* benchState) { + size_t actorCount = benchState->range(0); + uint32_t sum; + int seed = platform::getRandomSeed(); + while (benchState->KeepRunning()) { + sum = 0; + std::vector> futures; + futures.reserve(actorCount); + DeterministicRandom rand(seed); + for (int i = 0; i < actorCount; ++i) { + futures.push_back(increment(getRandomTaskPriority(rand), &sum)); + } + co_await waitForAll(futures); + benchmark::DoNotOptimize(sum); + } + benchState->SetItemsProcessed(actorCount * static_cast(benchState->iterations())); +} + +static void coroutine_net2(benchmark::State& benchState) { + onMainThread([&benchState] { return benchNet2Actor(&benchState); }).blockUntilReady(); +} + +BENCHMARK(coroutine_net2)->Range(1, 1 << 16)->ReportAggregatesOnly(true); + +static constexpr bool DELAY = false; +static constexpr bool YIELD = true; + +template +static Future benchDelay(benchmark::State* benchState) { + // Number of random delays to start to just to populate the run loop + // priority queue + int64_t timerCount = benchState->range(0); + std::vector> futures; + DeterministicRandom rand(platform::getRandomSeed()); + while (--timerCount > 0) { + futures.push_back(delay(1.0 + rand.random01(), getRandomTaskPriority(rand))); + } + + while (benchState->KeepRunning()) { + co_await (useYield ? yield() : delay(0)); + } + benchState->SetItemsProcessed(static_cast(benchState->iterations())); +} + +template +static void coroutine_delay(benchmark::State& benchState) { + onMainThread([&benchState] { return benchDelay(&benchState); }).blockUntilReady(); +} + +BENCHMARK_TEMPLATE(coroutine_delay, DELAY)->Range(0, 1 << 16)->ReportAggregatesOnly(true); +BENCHMARK_TEMPLATE(coroutine_delay, YIELD)->Range(0, 1 << 16)->ReportAggregatesOnly(true);