feat: Limit cache loading in cluster (#2985)

This PR adds an option to limit simultaneous cache loading in a cluster
to one node at a time.
Fixes #2707
This commit is contained in:
Sergey Kuznetsov
2026-03-09 17:11:20 +00:00
committed by GitHub
parent 53d9617b26
commit fbdd6d6105
34 changed files with 1283 additions and 79 deletions

View File

@@ -224,6 +224,7 @@ LedgerCache::setFull()
return;
full_ = true;
isCurrentlyLoading_ = false;
std::scoped_lock const lck{mtx_};
deletes_.clear();
}
@@ -290,4 +291,16 @@ LedgerCache::loadFromFile(std::string const& path, uint32_t minLatestSequence)
return {};
}
void
LedgerCache::startLoading()
{
isCurrentlyLoading_ = true;
}
bool
LedgerCache::isCurrentlyLoading() const
{
return isCurrentlyLoading_;
}
} // namespace data