From 66ccd8943379846f2b2afd3b9b15a75b9b327999 Mon Sep 17 00:00:00 2001 From: congyi <15605187270@163.com> Date: Wed, 20 Sep 2023 16:02:54 +0800 Subject: [PATCH] remove unused code --- .../hummock_test/src/compactor_tests.rs | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/src/storage/hummock_test/src/compactor_tests.rs b/src/storage/hummock_test/src/compactor_tests.rs index 374b1dae8aa09..6d7d685220f03 100644 --- a/src/storage/hummock_test/src/compactor_tests.rs +++ b/src/storage/hummock_test/src/compactor_tests.rs @@ -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