From fdab73d7b37570ea7844e0f3f58dd4cbf281f864 Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Fri, 18 Mar 2022 19:20:25 -0700 Subject: [PATCH] Rename TagSet variables in throttleCommandActor. Previously these were named "tags", conflicting with a state variable, and creating confusing issues when they go out of scope after a wait statement. --- fdbcli/ThrottleCommand.actor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fdbcli/ThrottleCommand.actor.cpp b/fdbcli/ThrottleCommand.actor.cpp index e23107b169..3909656eb9 100644 --- a/fdbcli/ThrottleCommand.actor.cpp +++ b/fdbcli/ThrottleCommand.actor.cpp @@ -178,14 +178,14 @@ ACTOR Future throttleCommandActor(Reference db, std::vector throttleType = TagThrottleType::MANUAL; @@ -242,11 +242,11 @@ ACTOR Future throttleCommandActor(Reference db, std::vector 0 || nextIndex == tokens.size() - 1) { + if (tagSet.size() > 0 || nextIndex == tokens.size() - 1) { is_error = true; continue; } - tags.addTag(tokens[nextIndex + 1]); + tagSet.addTag(tokens[nextIndex + 1]); nextIndex += 2; } } @@ -257,8 +257,8 @@ ACTOR Future throttleCommandActor(Reference db, std::vector 0) { - bool success = wait(ThrottleApi::unthrottleTags(db, tags, throttleType, priority)); + if (tagSet.size() > 0) { + bool success = wait(ThrottleApi::unthrottleTags(db, tagSet, throttleType, priority)); if (success) { printf("Unthrottled tag `%s'%s\n", tokens[3].toString().c_str(), priorityString.c_str()); } else {