1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-05-08 04:59:37 +02:00

roots: split constructor into separate start method

This allows us to use the fd cache and inode resolve functions
without starting crawler threads.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
Dieser Commit ist enthalten in:
Zygo Blaxell
2021-05-28 02:09:55 -04:00
Ursprung 0f0da21198
Commit 77ef6a0638
2 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
+1 -1
Datei anzeigen
@@ -987,7 +987,7 @@ BeesContext::start()
hash_table();
// Kick off the crawlers
roots();
roots()->start();
}
void
+4 -1
Datei anzeigen
@@ -546,12 +546,15 @@ BeesRoots::BeesRoots(shared_ptr<BeesContext> ctx) :
m_crawl_thread("crawl_transid"),
m_writeback_thread("crawl_writeback")
{
m_root_ro_cache.func([&](uint64_t root) -> bool {
return is_root_ro_nocache(root);
});
m_root_ro_cache.max_size(BEES_ROOT_FD_CACHE_SIZE);
}
void
BeesRoots::start()
{
m_crawl_thread.exec([&]() {
// Measure current transid before creating any crawlers
catch_all([&]() {