Fix localIncrementActors calculation in ConfigIncrement workload

This commit is contained in:
sfc-gh-tclinkenbeard 2021-08-02 17:52:28 -07:00
parent 6524dd1567
commit 6ac88a3cf9
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ public:
Future<Void> start(Database const& cx) override {
std::vector<Future<Void>> 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));
}