Files
mini_lsm/mini-lsm-starter/src/wal.rs
Alex Chi b4485f49c3 finish 2.7
Signed-off-by: Alex Chi <iskyzh@gmail.com>
2024-01-28 14:08:08 +08:00

34 lines
729 B
Rust

#![allow(dead_code)] // REMOVE THIS LINE after fully implementing this functionality
use std::fs::File;
use std::io::BufWriter;
use std::path::Path;
use std::sync::Arc;
use anyhow::Result;
use bytes::Bytes;
use crossbeam_skiplist::SkipMap;
use parking_lot::Mutex;
pub struct Wal {
file: Arc<Mutex<BufWriter<File>>>,
}
impl Wal {
pub fn create(_path: impl AsRef<Path>) -> Result<Self> {
unimplemented!()
}
pub fn recover(_path: impl AsRef<Path>, _skiplist: &SkipMap<Bytes, Bytes>) -> Result<Self> {
unimplemented!()
}
pub fn put(&self, _key: &[u8], _value: &[u8]) -> Result<()> {
unimplemented!()
}
pub fn sync(&self) -> Result<()> {
unimplemented!()
}
}