diff --git a/src/chasers/chaser_storage.cpp b/src/chasers/chaser_storage.cpp index 5ee4a03c..5ab3a18e 100644 --- a/src/chasers/chaser_storage.cpp +++ b/src/chasers/chaser_storage.cpp @@ -126,8 +126,8 @@ void chaser_storage::handle_timer(const code& ec) NOEXCEPT return; } - // Network is resumed or store is failed, cancel monitoring. - if (!suspended() || archive().is_fault()) + // Store is failed or the condition is clear, cancel monitoring. + if (archive().is_fault() || !to_bool(archive().get_space())) return; // There are often multiple events, each resetting the timer. @@ -152,6 +152,15 @@ void chaser_storage::do_reload() NOEXCEPT << "(" << full_node::store::tables.at(table) << ")"); })) { + // A locked reload is a wait (in-flight accessors), not a failure: + // retry on the timer. All other store errors are terminal. + if (ec == database::error::reload_locked) + { + LOGN("Reload deferred by in-flight accessors."); + disk_timer_->start(BIND(handle_timer, _1)); + return; + } + LOGF("Reload from disk full condition failed, " << ec.message()); } else