improve compaction concat iterator tests
Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
@@ -119,20 +119,6 @@ impl LeveledCompactionController {
|
||||
}
|
||||
priorities.sort_by(|a, b| a.partial_cmp(b).unwrap().reverse());
|
||||
|
||||
println!(
|
||||
"target level sizes: {:?}, real level sizes: {:?}, base_level: {}",
|
||||
target_level_size
|
||||
.iter()
|
||||
.map(|x| format!("{:.3}MB", *x as f64 / 1024.0 / 1024.0))
|
||||
.collect::<Vec<_>>(),
|
||||
real_level_size
|
||||
.iter()
|
||||
.map(|x| format!("{:.3}MB", *x as f64 / 1024.0 / 1024.0))
|
||||
.collect::<Vec<_>>(),
|
||||
base_level,
|
||||
);
|
||||
println!("compaction triggered by priority: {:?}", priorities);
|
||||
|
||||
let priority = priorities.first();
|
||||
if let Some((_, level)) = priority {
|
||||
println!(
|
||||
|
||||
@@ -327,7 +327,7 @@ pub fn check_compaction_ratio(storage: Arc<MiniLsm>) {
|
||||
}
|
||||
assert!(
|
||||
num_iters <= l0_sst_num + num_memtables + max_levels,
|
||||
"did you use concat iterators?"
|
||||
"we found {num_iters} iterators in your implementation, (l0_sst_num={l0_sst_num}, num_memtables={num_memtables}, max_levels={max_levels}) did you use concat iterators?"
|
||||
);
|
||||
}
|
||||
CompactionOptions::Leveled(LeveledCompactionOptions {
|
||||
@@ -355,7 +355,7 @@ pub fn check_compaction_ratio(storage: Arc<MiniLsm>) {
|
||||
}
|
||||
assert!(
|
||||
num_iters <= l0_sst_num + num_memtables + max_levels,
|
||||
"did you use concat iterators?"
|
||||
"we found {num_iters} iterators in your implementation, (l0_sst_num={l0_sst_num}, num_memtables={num_memtables}, max_levels={max_levels}) did you use concat iterators?"
|
||||
);
|
||||
}
|
||||
CompactionOptions::Tiered(TieredCompactionOptions {
|
||||
@@ -397,7 +397,7 @@ pub fn check_compaction_ratio(storage: Arc<MiniLsm>) {
|
||||
}
|
||||
assert!(
|
||||
num_iters <= num_memtables + num_tiers,
|
||||
"did you use concat iterators?"
|
||||
"we found {num_iters} iterators in your implementation, (num_memtables={num_memtables}, num_tiers={num_tiers}) did you use concat iterators?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user