From c1673817636ce4bebb86fd90106dda8e9e0497e1 Mon Sep 17 00:00:00 2001 From: yingsu00 Date: Mon, 16 Sep 2024 12:23:15 -0700 Subject: [PATCH] Fix blockedOperatorId_ when the driver is blocked for arbitration case (#11008) Summary: When the driver is blocked becuase it is under arbitration, the blockedOperatorId_ was set to be the next operator's id. However the blocked operator is the current operator and the blockedOperatorId_ should be set as the current operator's id. This commit fixes this issue. Pull Request resolved: https://github.com/facebookincubator/velox/pull/11008 Reviewed By: Yuhta Differential Revision: D62730528 Pulled By: xiaoxmeng fbshipit-source-id: c535dc1c50cba54561ca1778a896a18d6cb2c855 --- velox/exec/Driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/velox/exec/Driver.cpp b/velox/exec/Driver.cpp index bea69c0a352c..10d942f87b86 100644 --- a/velox/exec/Driver.cpp +++ b/velox/exec/Driver.cpp @@ -591,7 +591,7 @@ StopReason Driver::runInternal( // for the current running arbitration, it is more efficient // system-wide to let driver go off thread for the other queries which // have free memory capacity to run during the time. - blockedOperatorId_ = curOperatorId_ + 1; + blockedOperatorId_ = curOperatorId_; VELOX_CHECK(future.valid()); blockingReason_ = BlockingReason::kWaitForArbitration; blockingState = std::make_shared(