From 6ac88a3cf9e89fac434548317f8a8a06eadc355a Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Mon, 2 Aug 2021 17:52:28 -0700 Subject: [PATCH] Fix localIncrementActors calculation in ConfigIncrement workload --- fdbserver/workloads/ConfigIncrement.actor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fdbserver/workloads/ConfigIncrement.actor.cpp b/fdbserver/workloads/ConfigIncrement.actor.cpp index 05a0b9e9c9..6f146578f3 100644 --- a/fdbserver/workloads/ConfigIncrement.actor.cpp +++ b/fdbserver/workloads/ConfigIncrement.actor.cpp @@ -128,7 +128,8 @@ public: Future start(Database const& cx) override { std::vector> actors; - auto localIncrementActors = (incrementActors - clientId - 1) / clientCount + 1; + auto localIncrementActors = + (clientId < incrementActors) ? ((incrementActors - clientId - 1) / clientCount + 1) : 0; for (int i = 0; i < localIncrementActors; ++i) { actors.push_back(incrementActor(this, cx)); }