diff --git a/core/lib.rs b/core/lib.rs index 11b85be81..9327d7447 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -2360,6 +2360,23 @@ impl Connection { pub(crate) fn get_mv_tx(&self) -> Option<(u64, TransactionMode)> { *self.mv_tx.read() } + + pub(crate) fn set_mvcc_checkpoint_threshold(&self, threshold: u64) -> Result<()> { + match self.db.mv_store.as_ref() { + Some(mv_store) => { + mv_store.set_checkpoint_threshold(threshold); + Ok(()) + } + None => Err(LimboError::InternalError("MVCC not enabled".into())), + } + } + + pub(crate) fn mvcc_checkpoint_threshold(&self) -> Result { + match self.db.mv_store.as_ref() { + Some(mv_store) => Ok(mv_store.checkpoint_threshold()), + None => Err(LimboError::InternalError("MVCC not enabled".into())), + } + } } #[derive(Debug)]