mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
roots: fix extent lock failure handling
Drop the crawl_restart counter, it doesn't happen here (or anywhere else). Add the crawl_again counter for extents that are restarted due to an extent-level lock. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
af6ecbc69b
commit
a115587fad
@ -626,19 +626,17 @@ BeesFileCrawl::crawl_one_extent()
|
||||
// It might be corrupted data, the file might have been deleted or truncated,
|
||||
// or we might hit some other recoverable error. We'll try again with
|
||||
// the next extent.
|
||||
bool scanned_ok = false;
|
||||
bool scan_again = false;
|
||||
catch_all([&]() {
|
||||
BEESNOTE("scan_forward " << bfr);
|
||||
// BEESLOGDEBUG("scan_forward #" << Task::current_task().id() << " " << bfr);
|
||||
scanned_ok = m_ctx->scan_forward(bfr);
|
||||
scan_again = m_ctx->scan_forward(bfr);
|
||||
// BEESLOGDEBUG("done_forward #" << Task::current_task().id() << " " << bfr);
|
||||
} );
|
||||
if (scanned_ok) {
|
||||
if (!scan_again) {
|
||||
m_hold = new_holder;
|
||||
} else {
|
||||
BEESLOGDEBUG("retrying lock for extent at " << bfr);
|
||||
BEESCOUNT(crawl_restart);
|
||||
return true;
|
||||
BEESCOUNT(crawl_again);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user