Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage): provide end index for compactor iter to reduce io #17426

Merged
merged 11 commits into from
Jul 26, 2024
16 changes: 0 additions & 16 deletions src/storage/hummock_test/src/compactor_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ pub(crate) mod tests {
filter_key_extractor_manager,
)
.await;

hummock_manager_ref
.report_compact_task(
result_task.task_id,
Expand Down Expand Up @@ -1405,10 +1404,6 @@ pub(crate) mod tests {
normal_tables.push(sstable_store.sstable(sst_info, &mut stats).await.unwrap());
}
assert!(fast_ret.iter().all(|f| f.file_size < capacity * 6 / 5));
println!(
"fast sstables file size: {:?}",
fast_ret.iter().map(|f| f.file_size).collect_vec(),
);
assert!(can_concat(&ret));
assert!(can_concat(&fast_ret));
let read_options = Arc::new(SstableIteratorReadOptions::default());
Expand Down Expand Up @@ -1538,7 +1533,6 @@ pub(crate) mod tests {
sstable_store.clone(),
)
.await;
println!("generate ssts size: {}", sst.file_size);
ssts.push(sst);
}
let select_file_count = ssts.len() / 2;
Expand Down Expand Up @@ -1885,11 +1879,6 @@ pub(crate) mod tests {
max_sst_file_size = std::cmp::max(max_sst_file_size, sst_info.file_size);
sst_infos.push(sst_info);
}
println!(
"input data: {}",
sst_infos.iter().map(|sst| sst.file_size).sum::<u64>(),
);

let target_file_size = max_sst_file_size / 4;
let mut table_watermarks = BTreeMap::default();
let key_count = KEY_COUNT / VirtualNode::COUNT * 2;
Expand Down Expand Up @@ -1943,11 +1932,6 @@ pub(crate) mod tests {
..Default::default()
};
let (ret, fast_ret) = run_fast_and_normal_runner(compact_ctx.clone(), task).await;
println!(
"normal compact result data: {}, fast compact result data: {}",
ret.iter().map(|sst| sst.file_size).sum::<u64>(),
fast_ret.iter().map(|sst| sst.file_size).sum::<u64>(),
);
// check_compaction_result(compact_ctx.sstable_store, ret.clone(), fast_ret, target_file_size).await;
let mut fast_tables = Vec::with_capacity(fast_ret.len());
let mut normal_tables = Vec::with_capacity(ret.len());
Expand Down
Loading
Loading