From 8fb503eba70ad11d399c4454f1d916f015578301 Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Thu, 1 Feb 2024 09:04:37 +1000 Subject: [PATCH] Flat db heal - deprecate CLI option and set to always true (#6499) * flat db heal always set to true Signed-off-by: Sally MacFarlane * changelog Signed-off-by: Sally MacFarlane --------- Signed-off-by: Sally MacFarlane --- CHANGELOG.md | 1 + .../org/hyperledger/besu/cli/BesuCommand.java | 8 ---- .../options/unstable/SynchronizerOptions.java | 48 +++---------------- .../hyperledger/besu/cli/BesuCommandTest.java | 23 ++------- .../sync/snapsync/SnapSyncConfiguration.java | 2 +- 5 files changed, 12 insertions(+), 70 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f49917101b..89d8ca5496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Deprecations +- `--Xsnapsync-synchronizer-flat-db-healing-enabled` is deprecated (always enabled). [#6499](https://github.com/hyperledger/besu/pull/6499) ### Additions and Improvements - Upgrade Prometheus and Opentelemetry dependencies [#6422](https://github.com/hyperledger/besu/pull/6422) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index b24a8e1c2a..57d4cdb6a5 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -1677,14 +1677,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable { SyncMode.X_CHECKPOINT.equals(getDefaultSyncModeIfNotSet()), singletonList("--Xcheckpoint-post-merge-enabled")); - CommandLineUtils.failIfOptionDoesntMeetRequirement( - commandLine, - "--Xsnapsync-synchronizer-flat option can only be used when -Xsnapsync-synchronizer-flat-db-healing-enabled is true", - unstableSynchronizerOptions.isSnapsyncFlatDbHealingEnabled(), - asList( - "--Xsnapsync-synchronizer-flat-account-healed-count-per-request", - "--Xsnapsync-synchronizer-flat-slot-healed-count-per-request")); - if (!securityModuleName.equals(DEFAULT_SECURITY_MODULE) && nodePrivateKeyFileOption.getNodePrivateKeyFile() != null) { logger.warn( diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java index 8760258fba..2825811e52 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java @@ -106,7 +106,6 @@ public class SynchronizerOptions implements CLIOptions