diff --git a/crates/sui-core/src/jsonrpc_index.rs b/crates/sui-core/src/jsonrpc_index.rs index dcc4589f06657..220990d11eda9 100644 --- a/crates/sui-core/src/jsonrpc_index.rs +++ b/crates/sui-core/src/jsonrpc_index.rs @@ -255,6 +255,7 @@ pub struct IndexStoreTables { #[default_options_override_fn = "coin_index_table_default_config"] #[deprecated] + #[allow(unused)] coin_index: DBMap, #[default_options_override_fn = "coin_index_table_default_config"] coin_index_2: DBMap, @@ -340,19 +341,6 @@ impl IndexStoreTables { // Commit to the DB that the indexes have been initialized self.meta.insert(&(), &metadata)?; - // Clear old, deprecated and unused column families - if !self.coin_index.is_empty() { - self.coin_index.unsafe_clear()?; - } - - if !self.loaded_child_object_versions.is_empty() { - self.loaded_child_object_versions.unsafe_clear()?; - } - - if !self.timestamps.is_empty() { - self.timestamps.unsafe_clear()?; - } - Ok(()) } } diff --git a/crates/typed-store/src/rocks/mod.rs b/crates/typed-store/src/rocks/mod.rs index 282f1de1da8b3..7321acc3aa56f 100644 --- a/crates/typed-store/src/rocks/mod.rs +++ b/crates/typed-store/src/rocks/mod.rs @@ -981,7 +981,14 @@ impl DBMap { } fn report_metrics(rocksdb: &Arc, cf_name: &str, db_metrics: &Arc) { - let cf = rocksdb.cf_handle(cf_name).expect("Failed to get cf"); + let Some(cf) = rocksdb.cf_handle(cf_name) else { + tracing::warn!( + "unable to report metrics for cf {cf_name:?} in db {:?}", + rocksdb.db_name() + ); + return; + }; + db_metrics .cf_metrics .rocksdb_total_sst_files_size