Skip to content

Commit

Permalink
Update limit trie logs validation message for sync-mode=FULL (hyperle…
Browse files Browse the repository at this point in the history
…dger#7279)

Signed-off-by: Simon Dudley <[email protected]>

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Daniel Lehrner <[email protected]>
  • Loading branch information
2 people authored and daniellehrner committed Jul 16, 2024
1 parent d6f3470 commit 4424feb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ public void validate(final CommandLine commandLine, final SyncMode syncMode) {
throw new CommandLine.ParameterException(
commandLine,
String.format(
"Cannot enable " + BONSAI_LIMIT_TRIE_LOGS_ENABLED + " with sync-mode %s",
syncMode));
"Cannot enable %s with sync-mode %s. You must set %s or use a different sync-mode",
BONSAI_LIMIT_TRIE_LOGS_ENABLED,
SyncMode.FULL,
BONSAI_LIMIT_TRIE_LOGS_ENABLED + "=false"));
}
if (bonsaiMaxLayersToLoad < MINIMUM_BONSAI_TRIE_LOG_RETENTION_LIMIT) {
throw new CommandLine.ParameterException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ public void bonsaiTrieLogsEnabled_explicitlySetToFalse() {
"--bonsai-limit-trie-logs-enabled=false");
}

@Test
public void bonsaiTrieLogPruningWindowSizeShouldBePositive2() {
internalTestFailure(
"Cannot enable --bonsai-limit-trie-logs-enabled with sync-mode FULL. You must set --bonsai-limit-trie-logs-enabled=false or use a different sync-mode",
"--sync-mode",
"FULL");
}

@Test
public void bonsaiTrieLogPruningWindowSizeShouldBePositive() {
internalTestFailure(
Expand Down

0 comments on commit 4424feb

Please sign in to comment.