1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

roots: disable recent sorting by max_transid

On large filesystems where the min_transid of all subvols gets stuck at 0,
bees may lose the ability to effectively track recent data.  A secondary sort
by max_transid will allow scanning newer subvols that were created after bees
started running on the filesystem, but before bees completed the first scan
of all subvols.

On the other hand, the secondary sort does a reverse version of the
sequential scan mode, and the sequential scan mode is simply awful.

Disable it for now.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2022-12-19 00:19:18 -05:00
parent 984ceeb2a5
commit 7267707687

View File

@ -323,7 +323,11 @@ BeesScanModeRecent::next_transid(const CrawlMap &crawl_map)
if (this_range) {
const auto state_end = this_crawl->get_state_end();
const auto min_transid = state_end.m_min_transid;
const auto max_transid = state_end.m_max_transid;
// Should we use max_transid or only min_transid?
// Using max_transid here would make it more like sequential,
// and sequential is bad.
// const auto max_transid = state_end.m_max_transid;
const auto max_transid = 0;
const SortKey key { .min_transid = min_transid, .max_transid = max_transid };
sorted[key].push_back(this_crawl);
}