Skip to content

Commit

Permalink
Set upper bound on scan size in the upgrade utils
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Jan 23, 2024
1 parent edad113 commit 96967e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/SettingsUpgradeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ validateConfigUpgradeSet(ConfigUpgradeSet const& upgradeSet)
throw std::runtime_error("Invalid contractLedgerCost");
}
}
else if (entry.configSettingID() == CONFIG_SETTING_STATE_ARCHIVAL)
{
// 1048576 is our current phase1 scan size, and we don't expect to
// go past this anytime soon.
if (entry.stateArchivalSettings().evictionScanSize > 1048576)
{
throw std::runtime_error("Invalid evictionScanSize");
}
}
}
}

Expand Down

5 comments on commit 96967e3

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from dmkozh
at sisuresh@96967e3

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sisuresh/stellar-core/scan-safety = 96967e3 into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sisuresh/stellar-core/scan-safety = 96967e3 merged ok, testing candidate = 395bc28

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 395bc28

Please sign in to comment.