mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-15 11:10:20 +00:00
Compare commits
39 Commits
bthomee/ve
...
ximinez/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c31a1dd01 | ||
|
|
bbfaf85a14 | ||
|
|
1c4c998ae1 | ||
|
|
5d2faef541 | ||
|
|
5d2be06748 | ||
|
|
2f5b17c2cb | ||
|
|
a963e4a389 | ||
|
|
962f3ee744 | ||
|
|
2a7499a415 | ||
|
|
ae8c44b606 | ||
|
|
1edd6fe4bf | ||
|
|
2edf310a6f | ||
|
|
7af68be818 | ||
|
|
19fc5c48dd | ||
|
|
2f43a1901d | ||
|
|
6a0440bf6d | ||
|
|
cf398d05aa | ||
|
|
59a8e30a3e | ||
|
|
8160921783 | ||
|
|
6dc01196b4 | ||
|
|
cdbbbdd27f | ||
|
|
3d30c09031 | ||
|
|
e59ca23487 | ||
|
|
72c700c3e0 | ||
|
|
4589fcbcfc | ||
|
|
86d840f53d | ||
|
|
741b61cdf3 | ||
|
|
6bb0989c9f | ||
|
|
9120506613 | ||
|
|
3b3de96bd4 | ||
|
|
c9ab6ab25f | ||
|
|
fb0605cfd3 | ||
|
|
156553bb5e | ||
|
|
781b56849b | ||
|
|
278c02bebb | ||
|
|
1d6fedf9a2 | ||
|
|
2e8de499aa | ||
|
|
0bce3639a6 | ||
|
|
8f329e3bc6 |
@@ -23,7 +23,7 @@ namespace {
|
||||
//------------------------------------------------------------------------------
|
||||
// clang-format off
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
char const* const versionString = "3.3.0-rc1"
|
||||
char const* const versionString = "3.3.0-b1"
|
||||
// clang-format on
|
||||
;
|
||||
|
||||
|
||||
@@ -160,7 +160,11 @@ ValidatorSite::load(
|
||||
{
|
||||
try
|
||||
{
|
||||
sites_.emplace_back(uri);
|
||||
// This is not super efficient, but it doesn't happen often.
|
||||
bool found = std::ranges::any_of(
|
||||
sites_, [&uri](auto const& site) { return site.loadedResource->uri == uri; });
|
||||
if (!found)
|
||||
sites_.emplace_back(uri);
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
@@ -221,7 +225,17 @@ ValidatorSite::setTimer(
|
||||
std::scoped_lock<std::mutex> const& siteLock,
|
||||
std::scoped_lock<std::mutex> const& stateLock)
|
||||
{
|
||||
auto next = std::ranges::min_element(
|
||||
if (!sites_.empty() && //
|
||||
std::ranges::all_of(
|
||||
sites_, [](auto const& site) { return site.lastRefreshStatus.has_value(); }))
|
||||
{
|
||||
// If all of the sites have been handled at least once (including
|
||||
// errors and timeouts), call missingSite, which will load the cache
|
||||
// files for any lists that are still unavailable.
|
||||
missingSite(siteLock);
|
||||
}
|
||||
|
||||
auto const next = std::ranges::min_element(
|
||||
sites_, [](Site const& a, Site const& b) { return a.nextRefresh < b.nextRefresh; });
|
||||
|
||||
if (next != sites_.end())
|
||||
@@ -332,7 +346,7 @@ ValidatorSite::onRequestTimeout(std::size_t siteIdx, error_code const& ec)
|
||||
// processes a network error. Usually, this function runs first,
|
||||
// but on extremely rare occasions, the response handler can run
|
||||
// first, which will leave activeResource empty.
|
||||
auto const& site = sites_[siteIdx];
|
||||
auto& site = sites_[siteIdx];
|
||||
if (site.activeResource)
|
||||
{
|
||||
JLOG(j_.warn()) << "Request for " << site.activeResource->uri << " took too long";
|
||||
@@ -342,6 +356,9 @@ ValidatorSite::onRequestTimeout(std::size_t siteIdx, error_code const& ec)
|
||||
JLOG(j_.error()) << "Request took too long, but a response has "
|
||||
"already been processed";
|
||||
}
|
||||
if (!site.lastRefreshStatus)
|
||||
site.lastRefreshStatus.emplace(
|
||||
Site::Status{clock_type::now(), ListDisposition::Invalid, "timeout"});
|
||||
}
|
||||
|
||||
std::scoped_lock const lockState{stateMutex_};
|
||||
|
||||
Reference in New Issue
Block a user