refactor: address review comments
parent
428851b467
commit
b93b7e9304
|
@ -401,8 +401,9 @@ impl DbSetup for ThreeDeleteThreeChunks {
|
|||
.await;
|
||||
|
||||
// ----------------------
|
||||
// 1 OS chunk after compacting all 3 OS chunks
|
||||
let mut compact_os_scenarios =
|
||||
// A few more scenarios to compact all 3 OS chunk or the fist 2 OS chunks
|
||||
// with delete before or after the os_compaction
|
||||
let compact_os_scenarios =
|
||||
make_os_chunks_and_then_compact_with_different_scenarios_with_delete(
|
||||
vec![lp_lines_1.clone(), lp_lines_2.clone(), lp_lines_3.clone()],
|
||||
preds.clone(),
|
||||
|
@ -421,7 +422,7 @@ impl DbSetup for ThreeDeleteThreeChunks {
|
|||
scenario_3os,
|
||||
];
|
||||
|
||||
scenarios.append(&mut compact_os_scenarios);
|
||||
scenarios.extend(compact_os_scenarios.into_iter());
|
||||
|
||||
scenarios
|
||||
}
|
||||
|
|
|
@ -519,7 +519,10 @@ pub async fn make_os_chunks_and_then_compact_with_different_scenarios_with_delet
|
|||
db.delete(table_name, Arc::new((*pred).clone())).unwrap();
|
||||
}
|
||||
db.compact_object_store_chunks(table_name, partition_key, chunk_ids)
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
.join()
|
||||
.await;
|
||||
|
||||
let scenario_name = "Deletes and then compact all OS chunks".to_string();
|
||||
let scenario_1 = DbScenario { scenario_name, db };
|
||||
|
||||
|
@ -527,7 +530,9 @@ pub async fn make_os_chunks_and_then_compact_with_different_scenarios_with_delet
|
|||
let (db, chunk_ids) =
|
||||
make_contiguous_os_chunks(lp_lines_vec.clone(), table_name, partition_key).await;
|
||||
db.compact_object_store_chunks(table_name, partition_key, chunk_ids)
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
.join()
|
||||
.await;
|
||||
for pred in &preds {
|
||||
db.delete(table_name, Arc::new((*pred).clone())).unwrap();
|
||||
}
|
||||
|
@ -542,7 +547,9 @@ pub async fn make_os_chunks_and_then_compact_with_different_scenarios_with_delet
|
|||
}
|
||||
let (_last_chunk_id, chunk_ids_but_last) = chunk_ids.split_last().unwrap();
|
||||
db.compact_object_store_chunks(table_name, partition_key, chunk_ids_but_last.to_vec())
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
.join()
|
||||
.await;
|
||||
let scenario_name = "Deletes and then compact all but last OS chunk".to_string();
|
||||
let scenario_3 = DbScenario { scenario_name, db };
|
||||
|
||||
|
@ -551,7 +558,9 @@ pub async fn make_os_chunks_and_then_compact_with_different_scenarios_with_delet
|
|||
make_contiguous_os_chunks(lp_lines_vec.clone(), table_name, partition_key).await;
|
||||
let (_last_chunk_id, chunk_ids_but_last) = chunk_ids.split_last().unwrap();
|
||||
db.compact_object_store_chunks(table_name, partition_key, chunk_ids_but_last.to_vec())
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
.join()
|
||||
.await;
|
||||
for pred in &preds {
|
||||
db.delete(table_name, Arc::new((*pred).clone())).unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue