mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
roots: emit "crawl finished" at the correct time
The correct time is when we set the deferred bit after a tree search returns empty. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
82c2b5bafe
commit
de96a38460
@ -1077,6 +1077,7 @@ BeesCrawl::next_transid()
|
||||
|
||||
if (m_finished) {
|
||||
m_deferred = true;
|
||||
BEESLOGINFO("Crawl finished " << crawl_state);
|
||||
} else {
|
||||
// Log performance stats from the old crawl
|
||||
const auto current_time = time(NULL);
|
||||
@ -1110,7 +1111,6 @@ BeesCrawl::fetch_extents()
|
||||
|
||||
// We can't scan an empty transid interval.
|
||||
if (m_finished || old_state.m_max_transid <= old_state.m_min_transid) {
|
||||
BEESTRACE("Crawl finished " << get_state_end());
|
||||
return next_transid();
|
||||
}
|
||||
|
||||
@ -1162,6 +1162,8 @@ BeesCrawl::fetch_extents()
|
||||
return false;
|
||||
}
|
||||
if (!m_next_extent_data) {
|
||||
// Ran out of data in this subvol and transid.
|
||||
// Try to restart immediately if more transids are available.
|
||||
return next_transid();
|
||||
}
|
||||
auto new_state = old_state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user