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:
Ligh0x74
2025-05-05 17:40:20 +08:00
committed by GitHub
parent d383d70763
commit 09615d9ab3
2 changed files with 5 additions and 1 deletions

View File

@@ -248,6 +248,10 @@ impl LsmStorageInner {
.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
/// not exist.
pub(crate) fn open(path: impl AsRef<Path>, options: LsmStorageOptions) -> Result<Self> {

View File

@@ -33,7 +33,7 @@ impl Watermark {
pub fn remove_reader(&mut self, ts: u64) {}
pub fn num_retained_snapshots(&self) -> usize {
0
self.readers.len()
}
pub fn watermark(&self) -> Option<u64> {