sync: synchronize the methods used in the w3d4 test to mini-lsm-starter (#141)
Co-authored-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
@@ -248,6 +248,10 @@ impl LsmStorageInner {
|
|||||||
.fetch_add(1, std::sync::atomic::Ordering::SeqCst)
|
.fetch_add(1, std::sync::atomic::Ordering::SeqCst)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn mvcc(&self) -> &LsmMvccInner {
|
||||||
|
self.mvcc.as_ref().unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
/// Start the storage engine by either loading an existing directory or creating a new one if the directory does
|
/// Start the storage engine by either loading an existing directory or creating a new one if the directory does
|
||||||
/// not exist.
|
/// not exist.
|
||||||
pub(crate) fn open(path: impl AsRef<Path>, options: LsmStorageOptions) -> Result<Self> {
|
pub(crate) fn open(path: impl AsRef<Path>, options: LsmStorageOptions) -> Result<Self> {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ impl Watermark {
|
|||||||
pub fn remove_reader(&mut self, ts: u64) {}
|
pub fn remove_reader(&mut self, ts: u64) {}
|
||||||
|
|
||||||
pub fn num_retained_snapshots(&self) -> usize {
|
pub fn num_retained_snapshots(&self) -> usize {
|
||||||
0
|
self.readers.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn watermark(&self) -> Option<u64> {
|
pub fn watermark(&self) -> Option<u64> {
|
||||||
|
|||||||
Reference in New Issue
Block a user