From 0d212927f7b224b4336534f1d8187a5289aa5626 Mon Sep 17 00:00:00 2001 From: steviez Date: Wed, 26 Jun 2024 14:22:27 -0500 Subject: [PATCH 1/3] Add extra braces and run cargo fmt This to illustrate that none of the surrounding code is changing --- validator/src/main.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/validator/src/main.rs b/validator/src/main.rs index a87f6b3f488d9c..6c38f0212d1fcc 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1772,16 +1772,19 @@ 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 HERE + 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}"), }, }, From 653c59d2cfce6f35f09ac206e970a57449e4c754 Mon Sep 17 00:00:00 2001 From: steviez Date: Wed, 26 Jun 2024 14:25:48 -0500 Subject: [PATCH 2/3] Add deprecation warning for using fifo --- validator/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/validator/src/main.rs b/validator/src/main.rs index 6c38f0212d1fcc..f49c4e41fcfa1b 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1773,7 +1773,14 @@ pub fn main() { Some(shred_compaction_string) => match shred_compaction_string { "level" => ShredStorageType::RocksLevel, "fifo" => { - // WARN HERE + warn!( + "The value \"fifo\" for --rocksdb-shred-compaction has been deprecated. \ + Use of \"fifo\" will still work for now, but will be completely removed \ + in the future. To update, use \"level\" for --rocksdb-shred-compaction, \ + or remove the --rocksdb-shred-compaction argument altogether. Note that \ + the \"rocksdb_fifo\" subdirectory within the ledger directory will need \ + to be manually cleaned up 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, From c66f2076c487a2748f8e46fbd871ff5e15dd6e68 Mon Sep 17 00:00:00 2001 From: steviez Date: Thu, 27 Jun 2024 15:09:20 -0500 Subject: [PATCH 3/3] Add entry to changelog Also tweak the wording in warning message, including the specific mention of deprecation version --- CHANGELOG.md | 2 ++ validator/src/main.rs | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29cad14602c508..39c6fff6b5c7b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,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 f49c4e41fcfa1b..d3ab50685fade6 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1775,11 +1775,11 @@ pub fn main() { "fifo" => { warn!( "The value \"fifo\" for --rocksdb-shred-compaction has been deprecated. \ - Use of \"fifo\" will still work for now, but will be completely removed \ - in the future. To update, use \"level\" for --rocksdb-shred-compaction, \ - or remove the --rocksdb-shred-compaction argument altogether. Note that \ - the \"rocksdb_fifo\" subdirectory within the ledger directory will need \ - to be manually cleaned up once the validator is running with \"level\"." + 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(