From: Zygo Blaxell Date: Tue, 18 Feb 2025 01:02:18 +0000 (-0500) Subject: extent scan: extra check to make sure no Tasks are started when throttled X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9439dad93ae0773dfb0940bc9997231df6004c4d;p=bees extent scan: extra check to make sure no Tasks are started when throttled Previously `scan()` would run the extent scan loop once, and enqueue one extent, before checking for throttling. Do an extra check before that, and bail out so that zero extents are enqueued when throttled. Signed-off-by: Zygo Blaxell --- diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 52536ec9..930ac023 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -899,6 +899,9 @@ BeesScanModeExtent::scan() { BEESTRACE("bsm scan"); + // Do nothing if we are throttled + if (should_throttle()) return; + unique_lock lock(m_mutex); const auto size_tiers_copy = m_size_tiers; lock.unlock();