Skip to content

Commit

Permalink
fix: Fix flaky scaled scan fuzzer test (#11989)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #11989

The fuzzer test flakiness is due to the race between test thread and scaled controller close. This PR fixes the issue
by moving the driver index check after the controller close check

Reviewed By: tanjialiang

Differential Revision: D67727455

fbshipit-source-id: ba136ba86654104a7502bb3b0169cfd1a015ff8a
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Dec 31, 2024
1 parent dcccd90 commit e1c175b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions velox/exec/ScaledScanController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ void ScaledScanController::updateAndTryScale(
};
{
std::lock_guard<std::mutex> l(lock_);
VELOX_CHECK_LT(driverIdx, numRunningDrivers_);

if (closed_) {
return;
}

VELOX_CHECK_LT(driverIdx, numRunningDrivers_);

updateDriverScanUsageLocked(driverIdx, memoryUsage);

tryScaleLocked(driverPromise);
Expand Down

0 comments on commit e1c175b

Please sign in to comment.