Merge remote-tracking branch 'XRPLF/develop' into ximinez/online-delete-gaps

* XRPLF/develop:
  docs: Add --parallel flag to cmake build commands in BUILD.md (7302)
  fix: Fix wrong hybrid offer orderbook placement and update `LedgerStateFix` to amend `ExchangeRate` meta (7087)
  style: More clang-tidy identifier renaming (7290)
  fix: Update pDEX invariant firing under a valid offer deletion (7118)
  fix: Fix multisign and signfor to check for delegate (7064)
  refactor: Fix `sfGeneric` and `sfInvalid` field names (7300)
  docs: Fix some comments to improve readability (7122)
  feat: Propagate underlying MPT flags to vault shares (7077)
This commit is contained in:
Ed Hennis
2026-05-21 11:59:26 +01:00
217 changed files with 4179 additions and 1970 deletions

View File

@@ -116,7 +116,7 @@ SHAMapStoreImp::SHAMapStoreImp(
section.set("cache_mb", std::to_string(config.getValueFor(SizedItem::HashNodeDbCache)));
}
if (!section.exists("filter_bits") && (config.NODE_SIZE >= 2))
if (!section.exists("filter_bits") && (config.nodeSize >= 2))
section.set("filter_bits", "10");
}
@@ -148,15 +148,15 @@ SHAMapStoreImp::SHAMapStoreImp(
"online_delete must be at least " + std::to_string(minInterval));
}
if (config.LEDGER_HISTORY > deleteInterval_)
if (config.ledgerHistory > deleteInterval_)
{
Throw<std::runtime_error>(
"online_delete must not be less than ledger_history "
"(currently " +
std::to_string(config.LEDGER_HISTORY) + ")");
std::to_string(config.ledgerHistory) + ")");
}
state_db_.init(config, dbName_);
stateDb_.init(config, dbName_);
dbPaths();
}
}
@@ -169,14 +169,14 @@ SHAMapStoreImp::makeNodeStore(int readThreads)
if (deleteInterval_ != 0u)
{
SavedState state = state_db_.getState();
SavedState state = stateDb_.getState();
auto writableBackend = makeBackendRotating(state.writableDb);
auto archiveBackend = makeBackendRotating(state.archiveDb);
if (state.writableDb.empty())
{
state.writableDb = writableBackend->getName();
state.archiveDb = archiveBackend->getName();
state_db_.setState(state);
stateDb_.setState(state);
}
// Create NodeStore with two backends to allow online deletion of
@@ -251,12 +251,12 @@ void
SHAMapStoreImp::run()
{
beast::setCurrentThreadName("SHAMapStore");
LedgerIndex lastRotated = state_db_.getState().lastRotated;
LedgerIndex lastRotated = stateDb_.getState().lastRotated;
netOPs_ = &app_.getOPs();
ledgerMaster_ = &app_.getLedgerMaster();
if (advisoryDelete_)
canDelete_ = state_db_.getCanDelete();
canDelete_ = stateDb_.getCanDelete();
while (true)
{
@@ -286,7 +286,7 @@ SHAMapStoreImp::run()
if (lastRotated == 0u)
{
lastRotated = validatedSeq;
state_db_.setLastRotated(lastRotated);
stateDb_.setLastRotated(lastRotated);
}
bool const readyToRotate = validatedSeq >= lastRotated + deleteInterval_ &&
@@ -366,7 +366,7 @@ SHAMapStoreImp::run()
savedState.writableDb = writableName;
savedState.archiveDb = archiveName;
savedState.lastRotated = lastRotated;
state_db_.setState(savedState);
stateDb_.setState(savedState);
clearCaches(validatedSeq);
});
@@ -397,7 +397,7 @@ SHAMapStoreImp::dbPaths()
boost::filesystem::create_directories(dbPath);
}
SavedState state = state_db_.getState();
SavedState state = stateDb_.getState();
{
auto update = [&dbPath](std::string& sPath) {
@@ -417,7 +417,7 @@ SHAMapStoreImp::dbPaths()
if (update(state.writableDb))
{
update(state.archiveDb);
state_db_.setState(state);
stateDb_.setState(state);
}
}