add week 2 day 5 + 6 tests

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-26 15:19:56 +08:00
parent 595016f2b6
commit 14c3be390c
12 changed files with 206 additions and 27 deletions

View File

@@ -68,6 +68,7 @@ impl LsmStorageState {
}
}
#[derive(Debug, Clone)]
pub struct LsmStorageOptions {
// Block size in bytes
pub block_size: usize,
@@ -363,7 +364,7 @@ impl LsmStorageInner {
table_id,
Some(block_cache.clone()),
FileObject::open(&Self::path_of_sst_static(path, table_id))
.context("failed to open SST")?,
.with_context(|| format!("failed to open SST: {}", table_id))?,
)?;
state.sstables.insert(table_id, Arc::new(sst));
sst_cnt += 1;