From 58db4071de5f524c35b1362bfb5b1fceedea503f Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Fri, 3 Jan 2025 01:25:21 -0500 Subject: [PATCH] roots: use a non-idle task for next_transid The scanners which finish early can become stuck behind scanners that are able to keep the queue full. Switch the next_transid task to the normal Task queues so that we force scanners to restart on every new transaction, possibly deferring already queued work to do so. Signed-off-by: Zygo Blaxell --- src/bees-roots.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 1c01087..7092009 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -130,7 +130,7 @@ BeesScanMode::start_scan() st->scan(); }); } - m_scan_task.idle(); + m_scan_task.run(); } bool @@ -768,7 +768,7 @@ BeesScanModeExtent::scan() // Good to go, start everything running for (const auto &i : task_map_copy) { - i.second.idle(); + i.second.run(); } } @@ -901,7 +901,7 @@ BeesScanModeExtent::map_next_extent(uint64_t const subvol) << " time " << crawl_time << " subvol " << subvol); } - // We did something! Get in line to run again + // We did something! Get in line to run again (but don't preempt work already queued) Task::current_task().idle(); return; }