Add MVCC checkpoint threshold APIs to Connection

This commit is contained in:
bit-aloo
2025-10-07 10:10:47 +05:30
parent 66c69461fb
commit fb5f5d9a90

View File

@@ -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<u64> {
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)]