diff --git a/velox/exec/ExchangeClient.cpp b/velox/exec/ExchangeClient.cpp index 98d4369582b2..b37b50cca361 100644 --- a/velox/exec/ExchangeClient.cpp +++ b/velox/exec/ExchangeClient.cpp @@ -70,6 +70,8 @@ void ExchangeClient::noMoreRemoteTasks() { void ExchangeClient::close() { std::vector> sources; + std::queue producingSources; + std::queue> emptySources; { std::lock_guard l(queue_->mutex()); if (closed_) { @@ -77,6 +79,8 @@ void ExchangeClient::close() { } closed_ = true; sources = std::move(sources_); + producingSources = std::move(producingSources_); + emptySources = std::move(emptySources_); } // Outside of mutex. diff --git a/velox/exec/tests/MultiFragmentTest.cpp b/velox/exec/tests/MultiFragmentTest.cpp index 57e42dfb64e4..0beaba37d2a0 100644 --- a/velox/exec/tests/MultiFragmentTest.cpp +++ b/velox/exec/tests/MultiFragmentTest.cpp @@ -1891,7 +1891,7 @@ DEBUG_ONLY_TEST_F(MultiFragmentTest, exchangeStatsOnFailure) { }); auto producerPlan = PlanBuilder() - .values({data}, false, 100) + .values({data}, false, 30) .partitionedOutput({}, 1) .planNode();