From 48d2fe1396343fdf536b5e0afe91494bb592801c Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 2 May 2022 13:22:58 -0400 Subject: [PATCH] fix: shutdown compactor more quickly on cancel (#4495) * fix: shutdown compactor more quickly on cancel * fix: fixup docs --- compactor/src/handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compactor/src/handler.rs b/compactor/src/handler.rs index f10fb89d27..407ba0eae6 100644 --- a/compactor/src/handler.rs +++ b/compactor/src/handler.rs @@ -199,7 +199,7 @@ async fn run_compactor(compactor: Arc, shutdown: CancellationToken) { let _ = futures::future::join_all(handles).await; // if all candidate partitions have been compacted, wait a bit - // before checking again, but don'skip sleeping if cancel arrives + // before checking again, waking early if cancel arrives if compactions_run == n_candidates { select! { () = tokio::time::sleep(Duration::from_secs(5)).fuse() => {},