From fb5f5d9a9010d0d720534597cf7077d7cf2afaf3 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Tue, 7 Oct 2025 10:10:47 +0530 Subject: [PATCH] Add MVCC checkpoint threshold APIs to Connection --- core/lib.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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)]