From bef2f5dfaf6ae82849550d1f72e46d80c5ddd160 Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Wed, 15 Jun 2022 19:12:25 -0700 Subject: [PATCH] Recalculate rate in each iteration of testClient --- fdbserver/GlobalTagThrottler.actor.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fdbserver/GlobalTagThrottler.actor.cpp b/fdbserver/GlobalTagThrottler.actor.cpp index 9b63c80891..68a1928a38 100644 --- a/fdbserver/GlobalTagThrottler.actor.cpp +++ b/fdbserver/GlobalTagThrottler.actor.cpp @@ -305,11 +305,9 @@ ACTOR static Future testClient(GlobalTagThrottler* globalTagThrottler, loop { auto tpsLimit = testGetTPSLimit(*globalTagThrottler, tag); state double tpsRate = tpsLimit.present() ? std::min(desiredTpsRate, tpsLimit.get()) : desiredTpsRate; - loop { - wait(delay(1 / tpsRate)); - testStorageServers->addReadCost(tag, costPerTransaction); - globalTagThrottler->addRequests(tag, 1); - } + wait(delay(1 / tpsRate)); + testStorageServers->addReadCost(tag, costPerTransaction); + globalTagThrottler->addRequests(tag, 1); } }