]> git.hungrycats.org Git - bees/commitdiff
roots: use a non-idle task for next_transid
authorZygo Blaxell <bees@furryterror.org>
Fri, 3 Jan 2025 06:25:21 +0000 (01:25 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sat, 4 Jan 2025 04:36:53 +0000 (23:36 -0500)
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 <bees@furryterror.org>
src/bees-roots.cc

index 1c010872d1f3efeddaf0a27289c5157f7813b048..7092009871c7586c8094cd59aec509babfbf1cb5 100644 (file)
@@ -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;
        }