From d3627d6570ca61ddbd4fb8370f4aa5381c3a2c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Bezerra?= Date: Mon, 3 Jun 2024 13:16:32 -0300 Subject: [PATCH] rocksdb add more tracing instrument --- src/eth/storage/rocks/rocks_db.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eth/storage/rocks/rocks_db.rs b/src/eth/storage/rocks/rocks_db.rs index ee520096f..4ef1e0fb0 100644 --- a/src/eth/storage/rocks/rocks_db.rs +++ b/src/eth/storage/rocks/rocks_db.rs @@ -15,6 +15,7 @@ use crate::eth::storage::rocks::rocks_config::DbConfig; /// Create or open the Database with the configs applied to all column families /// /// The returned `Options` need to be stored to refer to the DB metrics +#[tracing::instrument(skip_all)] pub fn create_or_open_db(path: impl AsRef, cf_configs: &HashMap<&'static str, Options>) -> anyhow::Result<(Arc, Options)> { let path = path.as_ref(); @@ -38,7 +39,9 @@ pub fn create_or_open_db(path: impl AsRef, cf_configs: &HashMap<&'static s Ok((Arc::new(db), db_opts)) } +#[tracing::instrument(skip_all)] pub fn create_new_backup(db: &DB) -> anyhow::Result<()> { + tracing::info!("Creating new DB backup"); let mut backup_engine = backup_engine(db)?; backup_engine.create_new_backup(db)?; backup_engine.purge_old_backups(2)?;