Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Sep 20, 2023
1 parent 1e46a6c commit 66ccd89
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions src/storage/hummock_test/src/compactor_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,57 +460,7 @@ pub(crate) mod tests {
table.value().meta.estimated_size,
target_table_size
);
} // 2. get compact task

// 3. compact
while let Some(compact_task) = hummock_manager_ref
.get_compact_task(
StaticCompactionGroupId::StateDefault.into(),
&mut default_level_selector(),
)
.await
.unwrap()
{
// 3. compact
let (_tx, rx) = tokio::sync::oneshot::channel();
let (mut result_task, task_stats) = compact(
compact_ctx.clone(),
compact_task.clone(),
rx,
Box::new(sstable_object_id_manager.clone()),
filter_key_extractor_manager.clone(),
)
.await;

hummock_manager_ref
.report_compact_task(&mut result_task, Some(to_prost_table_stats_map(task_stats)))
.await
.unwrap();
}

// 4. get the latest version and check
let version = hummock_manager_ref.get_current_version().await;
let output_tables = version
.get_compaction_group_levels(StaticCompactionGroupId::StateDefault.into())
.levels
.iter()
.flat_map(|level| level.table_infos.clone())
.collect_vec();
for output_table in &output_tables {
let table = storage
.sstable_store()
.sstable(output_table, &mut StoreLocalStatistic::default())
.await
.unwrap();
let target_table_size = storage.storage_opts().sstable_size_mb * (1 << 20);
assert!(
table.value().meta.estimated_size > target_table_size,
"table.meta.estimated_size {} <= target_table_size {}",
table.value().meta.estimated_size,
target_table_size
);
}

// 5. storage get back the correct kv after compaction
storage.wait_version(version).await;
let get_val = storage
Expand Down

0 comments on commit 66ccd89

Please sign in to comment.