Skip to content

Commit

Permalink
Simplify further--online set/modify minimumOnline_ during
Browse files Browse the repository at this point in the history
online deletion.
  • Loading branch information
mtrippled committed May 14, 2020
1 parent c712cbf commit 52a9314
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/ripple/app/misc/SHAMapStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ class SHAMapStore
This defines the lower bound for attempting to acquire historical
ledgers over the peer to peer network.
When the process starts, it is set to that of the minimum persisted
in the ledger database, if any. If online_delete is enabled, then
each time online_delete executes, just prior to clearing SQL databases
of historical ledgers, move the value forward to one past the greatest
ledger being deleted. This minimizes fetching of ledgers that are in
the process of being deleted. Without online_delete, this value is
always the minimum value persisted in the ledger database, if any.
If online_delete is enabled, then each time online_delete executes
and just prior to clearing SQL databases of historical ledgers,
move the value forward to one past the greatest ledger being deleted.
This minimizes fetching of ledgers that are in the process of being
deleted. Without online_delete or before online_delete is
executed, this value is always the minimum value persisted in the
ledger database, if any.
@return The minimum ledger sequence to keep online based on the
description above. If not set, then an unseated optional.
Expand Down
6 changes: 0 additions & 6 deletions src/ripple/app/misc/SHAMapStoreImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,6 @@ SHAMapStoreImp::run()
if (advisoryDelete_)
canDelete_ = state_db_.getCanDelete();

// Don't acquire ledgers from the network older than
// the earliest persisted, if any.
auto const minSql = app_.getLedgerMaster().minSqlSeq();
if (minSql.has_value())
minimumOnline_ = *minSql;

while (true)
{
healthy_ = true;
Expand Down

0 comments on commit 52a9314

Please sign in to comment.