check compaction converge for simple leveled
Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
This commit is contained in:
@@ -160,7 +160,6 @@ fn main() {
|
||||
}
|
||||
let mut num_compactions = 0;
|
||||
while let Some(task) = controller.generate_compaction_task(&storage.snapshot) {
|
||||
num_compactions += 1;
|
||||
println!("--- Compaction Task ---");
|
||||
let mut sst_ids = Vec::new();
|
||||
for file in task
|
||||
@@ -194,6 +193,10 @@ fn main() {
|
||||
} else {
|
||||
storage.dump_original_id(true);
|
||||
}
|
||||
num_compactions += 1;
|
||||
if num_compactions >= max_levels * 2 {
|
||||
panic!("compaction does not converge?");
|
||||
}
|
||||
}
|
||||
if num_compactions == 0 {
|
||||
println!("no compaction triggered");
|
||||
|
||||
Reference in New Issue
Block a user