Skip to content

Commit

Permalink
Update limit trie logs validation message for sync-mode=FULL (#7279)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Dudley <[email protected]>

Co-authored-by: Sally MacFarlane <[email protected]>
  • Loading branch information
siladu and macfarla authored Jul 4, 2024
1 parent 4ee14ec commit d2b42d5
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 d2b42d5

Please sign in to comment.