fix: shutdown compactor more quickly on cancel (#4495)

* fix: shutdown compactor more quickly on cancel

* fix: fixup docs
pull/24376/head
Andrew Lamb 2022-05-02 13:22:58 -04:00 committed by GitHub
parent c05383bbf5
commit 48d2fe1396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ async fn run_compactor(compactor: Arc<Compactor>, 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() => {},