Skip to content

Commit

Permalink
get progress from right db
Browse files Browse the repository at this point in the history
  • Loading branch information
areshand committed Nov 25, 2024
1 parent 516f32e commit a3583ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion storage/aptosdb/src/backup/restore_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl RestoreHandler {
}

pub fn get_in_progress_state_kv_snapshot_version(&self) -> Result<Option<Version>> {
let db = self.aptosdb.ledger_db.metadata_db_arc();
let db = self.aptosdb.state_kv_db.metadata_db_arc();
let mut iter = db.iter::<DbMetadataSchema>()?;
iter.seek_to_first();
while let Some((k, _v)) = iter.next().transpose()? {
Expand Down
4 changes: 4 additions & 0 deletions storage/aptosdb/src/state_kv_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ impl StateKvDb {
&self.state_kv_metadata_db
}

pub(crate) fn metadata_db_arc(&self) -> Arc<DB> {
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]
}
Expand Down

0 comments on commit a3583ca

Please sign in to comment.