diff --git a/storage/aptosdb/src/backup/restore_handler.rs b/storage/aptosdb/src/backup/restore_handler.rs index e9be0ae54bf36..42339c122da73 100644 --- a/storage/aptosdb/src/backup/restore_handler.rs +++ b/storage/aptosdb/src/backup/restore_handler.rs @@ -132,7 +132,7 @@ impl RestoreHandler { } pub fn get_in_progress_state_kv_snapshot_version(&self) -> Result> { - let db = self.aptosdb.ledger_db.metadata_db_arc(); + let db = self.aptosdb.state_kv_db.metadata_db_arc(); let mut iter = db.iter::()?; iter.seek_to_first(); while let Some((k, _v)) = iter.next().transpose()? { diff --git a/storage/aptosdb/src/state_kv_db.rs b/storage/aptosdb/src/state_kv_db.rs index f0cb7a27c2174..0dfc0755efe1b 100644 --- a/storage/aptosdb/src/state_kv_db.rs +++ b/storage/aptosdb/src/state_kv_db.rs @@ -201,6 +201,10 @@ impl StateKvDb { &self.state_kv_metadata_db } + pub(crate) fn metadata_db_arc(&self) -> Arc { + Arc::clone(&self.state_kv_metadata_db) + } + pub(crate) fn db_shard(&self, shard_id: u8) -> &DB { &self.state_kv_db_shards[shard_id as usize] }