Skip to content

Commit

Permalink
try_catch_up_with_primary
Browse files Browse the repository at this point in the history
  • Loading branch information
smartgoo committed Sep 14, 2024
1 parent 072bca6 commit 818c963
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion database/src/db.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rocksdb::{DBWithThreadMode, MultiThreaded};
use rocksdb::{DBWithThreadMode, Error, MultiThreaded};
use std::ops::{Deref, DerefMut};
use std::path::PathBuf;

Expand All @@ -17,6 +17,10 @@ impl DB {
pub fn new(inner: DBWithThreadMode<MultiThreaded>, fd_guard: FDGuard) -> Self {
Self { inner, _fd_guard: fd_guard }
}

pub fn try_catchup_with_primary(&self) -> Result<(), Error> {
Ok(self.inner.try_catch_up_with_primary()?)
}
}

impl DerefMut for DB {
Expand Down

0 comments on commit 818c963

Please sign in to comment.