diff --git a/src/mito2/src/schedule/remote_job_scheduler.rs b/src/mito2/src/schedule/remote_job_scheduler.rs index 487b2c9365..9c71f887ba 100644 --- a/src/mito2/src/schedule/remote_job_scheduler.rs +++ b/src/mito2/src/schedule/remote_job_scheduler.rs @@ -160,7 +160,6 @@ impl DefaultNotifier { #[async_trait::async_trait] impl Notifier for DefaultNotifier { async fn notify(&self, result: RemoteJobResult, waiters: Vec) { - INFLIGHT_COMPACTION_COUNT.dec(); let Some(execution) = self .execution .lock() @@ -170,6 +169,7 @@ impl Notifier for DefaultNotifier { error!("Remote compaction notifier invoked more than once"); return; }; + INFLIGHT_COMPACTION_COUNT.dec(); match result { RemoteJobResult::CompactionJobResult(result) => { let notify = {