From 54d4f7d13f80ff4b0c4a7bf6d6b66813dd3ec4e5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:44:44 -0500 Subject: [PATCH] v2.0: Deprecate --rocksdb-shred-compaction fifo (backport of #1882) (#1907) Deprecate --rocksdb-shred-compaction fifo (#1882) The fifo compaction option was originally added to mitigate write stalls that were occurring with level compaction. Since fifo was introduced, the level compaction implementation has been optimized to reduce I/O amplification. With these improvements, level and fifo are comparable and sticking with level only simplifies things. For now, only a deprecation warning will be printed. In the next release branch (2.1.0), specifying fifo will be an error (cherry picked from commit e15e235ec43e55e1028a3c418dab6c6c621a2a87) Co-authored-by: steviez --- CHANGELOG.md | 2 ++ validator/src/main.rs | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb5d17f29fe16c..de6f0f64a011bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,8 @@ Release channels have their own copy of this changelog: * Partitions are recalculated on boot from snapshot (#1159) * `epoch_rewards_status` removed from snapshot (#1274) * Added `unified-scheduler` option for `--block-verification-method` (#1668) + * Deprecate the `fifo` option for `--rocksdb-shred-compaction` (#1882) + * `fifo` will remain supported in v2.0 with plans to fully remove in v2.1 ## [1.18.0] * Changes diff --git a/validator/src/main.rs b/validator/src/main.rs index f6cdcdd928eb3a..321f31fe13d917 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1771,16 +1771,26 @@ pub fn main() { None => ShredStorageType::default(), Some(shred_compaction_string) => match shred_compaction_string { "level" => ShredStorageType::RocksLevel, - "fifo" => match matches.value_of("rocksdb_fifo_shred_storage_size") { - None => ShredStorageType::rocks_fifo(default_fifo_shred_storage_size( - &validator_config, - )), - Some(_) => ShredStorageType::rocks_fifo(Some(value_t_or_exit!( - matches, - "rocksdb_fifo_shred_storage_size", - u64 - ))), - }, + "fifo" => { + warn!( + "The value \"fifo\" for --rocksdb-shred-compaction has been deprecated. \ + Use of \"fifo\" will still work for now, but is planned for full removal \ + in v2.1. To update, use \"level\" for --rocksdb-shred-compaction, or \ + remove the --rocksdb-shred-compaction argument altogether. Note that the \ + entire \"rocksdb_fifo\" subdirectory within the ledger directory will \ + need to be manually removed once the validator is running with \"level\"." + ); + match matches.value_of("rocksdb_fifo_shred_storage_size") { + None => ShredStorageType::rocks_fifo(default_fifo_shred_storage_size( + &validator_config, + )), + Some(_) => ShredStorageType::rocks_fifo(Some(value_t_or_exit!( + matches, + "rocksdb_fifo_shred_storage_size", + u64 + ))), + } + } _ => panic!("Unrecognized rocksdb-shred-compaction: {shred_compaction_string}"), }, },