@@ -70,7 +70,7 @@ pub struct MockStorage {
|
||||
impl MockStorage {
|
||||
pub fn new() -> Self {
|
||||
let snapshot = LsmStorageState {
|
||||
memtable: Arc::new(MemTable::create()),
|
||||
memtable: Arc::new(MemTable::create(0)),
|
||||
imm_memtables: Vec::new(),
|
||||
l0_sstables: Vec::new(),
|
||||
levels: Vec::new(),
|
||||
@@ -78,7 +78,7 @@ impl MockStorage {
|
||||
};
|
||||
Self {
|
||||
snapshot,
|
||||
next_sst_id: 0,
|
||||
next_sst_id: 1,
|
||||
file_list: Default::default(),
|
||||
total_flushes: 0,
|
||||
total_writes: 0,
|
||||
|
||||
@@ -13,6 +13,7 @@ fn main() -> Result<()> {
|
||||
level0_file_num_compaction_trigger: 2,
|
||||
max_levels: 4,
|
||||
}),
|
||||
enable_wal: false,
|
||||
},
|
||||
)?;
|
||||
let mut epoch = 0;
|
||||
@@ -51,7 +52,7 @@ fn main() -> Result<()> {
|
||||
println!("{} not exist", key);
|
||||
}
|
||||
} else if line == "flush" {
|
||||
lsm.force_flush_imm_memtables()?;
|
||||
lsm.force_flush()?;
|
||||
} else if line == "quit" {
|
||||
lsm.close()?;
|
||||
break;
|
||||
Reference in New Issue
Block a user