Add getter/setter for checkpoint threshold in LogicalLog

Wire threshold access through Storage

Add checkpoint threshold accessors to MvStore
This commit is contained in:
bit-aloo
2025-10-07 10:09:39 +05:30
parent 497808a40c
commit 66c69461fb
3 changed files with 12 additions and 0 deletions

View File

@@ -2035,6 +2035,10 @@ impl<Clock: LogicalClock> MvStore<Clock> {
pub fn set_checkpoint_threshold(&self, threshold: u64) {
self.storage.set_checkpoint_threshold(threshold)
}
pub fn checkpoint_threshold(&self) -> u64 {
self.storage.checkpoint_threshold()
}
}
/// A write-write conflict happens when transaction T_current attempts to update a

View File

@@ -235,6 +235,10 @@ impl LogicalLog {
pub fn set_checkpoint_threshold(&mut self, threshold: u64) {
self.checkpoint_threshold = threshold;
}
pub fn checkpoint_threshold(&self) -> u64 {
self.checkpoint_threshold
}
}
pub enum StreamingResult {

View File

@@ -49,6 +49,10 @@ impl Storage {
.unwrap()
.set_checkpoint_threshold(threshold)
}
pub fn checkpoint_threshold(&self) -> u64 {
self.logical_log.read().unwrap().checkpoint_threshold()
}
}
impl Debug for Storage {