implement mvcc compaction + snapshot

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-26 16:52:37 +08:00
parent 14c3be390c
commit 6025bb8dca
17 changed files with 300 additions and 63 deletions

View File

@@ -162,6 +162,10 @@ impl MiniLsm {
}))
}
pub fn new_txn(&self) -> Result<()> {
self.inner.new_txn()
}
pub fn write_batch<T: AsRef<[u8]>>(&self, batch: &[WriteBatchRecord<T>]) -> Result<()> {
self.inner.write_batch(batch)
}
@@ -300,6 +304,11 @@ impl LsmStorageInner {
unimplemented!()
}
pub fn new_txn(&self) -> Result<()> {
// no-op
Ok(())
}
/// Create an iterator over a range of keys.
pub fn scan(
&self,