diff --git a/database/src/db.rs b/database/src/db.rs index b1d6bf24e..74486040f 100644 --- a/database/src/db.rs +++ b/database/src/db.rs @@ -1,4 +1,4 @@ -use rocksdb::{DBWithThreadMode, MultiThreaded}; +use rocksdb::{DBWithThreadMode, Error, MultiThreaded}; use std::ops::{Deref, DerefMut}; use std::path::PathBuf; @@ -17,6 +17,10 @@ impl DB { pub fn new(inner: DBWithThreadMode, 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 {