From da68076f04b97497f6f7f9f06461ff6b54369d12 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 10 Jul 2025 12:55:06 -0400 Subject: [PATCH] Change default recovery wait time to 1s See https://github.com/XRPLF/rippled/pull/5531#issuecomment-3058218837 --- cfg/rippled-example.cfg | 5 +++-- src/xrpld/app/misc/SHAMapStoreImp.h | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cfg/rippled-example.cfg b/cfg/rippled-example.cfg index 8fb7d00875..f6903e06d8 100644 --- a/cfg/rippled-example.cfg +++ b/cfg/rippled-example.cfg @@ -1010,10 +1010,11 @@ # The online delete process checks periodically # that rippled is still in sync with the network, # and that the validated ledger is less than -# 'age_threshold_seconds' old. If not, then continue +# 'age_threshold_seconds' old, and that all +# recent ledgers are available. If not, then continue # sleeping for this number of seconds and # checking until healthy. -# Default is 5. +# Default is 1. # # Notes: # The 'node_db' entry configures the primary, persistent storage. diff --git a/src/xrpld/app/misc/SHAMapStoreImp.h b/src/xrpld/app/misc/SHAMapStoreImp.h index 6fe37bb611..0aa59f3df2 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.h +++ b/src/xrpld/app/misc/SHAMapStoreImp.h @@ -107,11 +107,11 @@ private: std::uint32_t deleteBatch_ = 100; std::chrono::milliseconds backOff_{100}; std::chrono::seconds ageThreshold_{60}; - /// If the node is out of sync during an online_delete healthWait() - /// call, sleep the thread for this time, and continue checking until - /// recovery. + /// If the node is out of sync, or any recent ledgers are not + /// available during an online_delete healthWait() call, sleep + /// the thread for this time, and continue checking until recovery. /// See also: "recovery_wait_seconds" in rippled-example.cfg - std::chrono::seconds recoveryWaitTime_{5}; + std::chrono::seconds recoveryWaitTime_{1}; // these do not exist upon SHAMapStore creation, but do exist // as of run() or before