mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-16 05:24:22 +01:00
Add MVCC checkpoint threshold APIs to Connection
This commit is contained in:
17
core/lib.rs
17
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<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)]
|
||||
|
||||
Reference in New Issue
Block a user