mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 08:55:40 +01:00
Add getter/setter for checkpoint threshold in LogicalLog
Wire threshold access through Storage Add checkpoint threshold accessors to MvStore
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user