From a265499325d595a1c62a581b84e43fcf1566d4e1 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Wed, 30 Jul 2025 19:24:56 +0800 Subject: [PATCH] fix(test): concurrency issue in compaction tests (#6615) fix/compaction-concurrency: Add delay before compaction in `compaction_test.rs` - Introduced a 2-millisecond delay using `tokio::time::sleep` before the `compact` function call in `test_compaction_region_with_overlapping_delete_all` to ensure proper timing and synchronization during the test execution. Signed-off-by: Lei, HUANG --- src/mito2/src/engine/compaction_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mito2/src/engine/compaction_test.rs b/src/mito2/src/engine/compaction_test.rs index d73ab22de1..9e1aa7d3de 100644 --- a/src/mito2/src/engine/compaction_test.rs +++ b/src/mito2/src/engine/compaction_test.rs @@ -485,7 +485,7 @@ async fn test_compaction_region_with_overlapping_delete_all() { put_and_flush(&engine, region_id, &column_schemas, 0..2400).await; // window 3600 put_and_flush(&engine, region_id, &column_schemas, 0..3600).await; // window 3600 delete_and_flush(&engine, region_id, &column_schemas, 0..10800).await; // window 10800 - + tokio::time::sleep(Duration::from_millis(2)).await; compact(&engine, region_id).await; let scanner = engine .scanner(region_id, ScanRequest::default())