From c4fcd596cc64785648becb1bb07239162bfa2f78 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Fri, 20 Nov 2026 03:25:34 +0000 Subject: [PATCH] test(mito2): verify pause initiates local compaction cancellation Signed-off-by: WenyXu (cherry picked from commit 8c2f925aae1882458b5a05d33067a089786f83fa) --- src/mito2/src/compaction/scheduler_test.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mito2/src/compaction/scheduler_test.rs b/src/mito2/src/compaction/scheduler_test.rs index 7d1b4acbe8b..e2c054b77bf 100644 --- a/src/mito2/src/compaction/scheduler_test.rs +++ b/src/mito2/src/compaction/scheduler_test.rs @@ -1317,6 +1317,12 @@ async fn test_cancelled_queued_unit_releases_fenced_ddl( let pause_waiters = pause_first.then(|| { let first = pending_pause(&mut scheduler, region_id); let second = pending_pause(&mut scheduler, region_id); + let (active, _) = + CompactionState::current(&scheduler.region_status[®ion_id].shared_state); + assert_eq!( + active.unwrap().snapshot(None).state.as_ref(), + compaction_task::STATE_CANCELLING + ); [first, second] });