From 14e5dd74fef0928ad470dabd449d43f9dfbb8768 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Fri, 5 Jul 2019 19:09:09 -0700 Subject: [PATCH] Add a checkOnly parameter to Cycle workload. So that it can be used in the real world for consistency checking of backup and DR. --- fdbserver/workloads/Cycle.actor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fdbserver/workloads/Cycle.actor.cpp b/fdbserver/workloads/Cycle.actor.cpp index e622ffe4a3..62c80af294 100644 --- a/fdbserver/workloads/Cycle.actor.cpp +++ b/fdbserver/workloads/Cycle.actor.cpp @@ -28,6 +28,7 @@ struct CycleWorkload : TestWorkload { int actorCount, nodeCount; double testDuration, transactionsPerSecond, minExpectedTransactionsPerSecond; Key keyPrefix; + bool checkOnly; vector> clients; PerfIntCounter transactions, retries, tooOldRetries, commitFailedRetries; @@ -44,6 +45,7 @@ struct CycleWorkload : TestWorkload { nodeCount = getOption(options, LiteralStringRef("nodeCount"), transactionsPerSecond * clientCount); keyPrefix = getOption(options, LiteralStringRef("keyPrefix"), LiteralStringRef("")); minExpectedTransactionsPerSecond = transactionsPerSecond * getOption(options, LiteralStringRef("expectedRate"), 0.7); + checkOnly = getOption(options, LiteralStringRef("checkOnly"), false); } virtual std::string description() { return "CycleWorkload"; } @@ -51,6 +53,7 @@ struct CycleWorkload : TestWorkload { return bulkSetup( cx, this, nodeCount, Promise() ); } virtual Future start( Database const& cx ) { + if (checkOnly) return Void(); for(int c=0; c