Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove health_check_notifier from RequestMetricsGuard
Signed-off-by: tzulingk@nvidia.com <tzulingk@nvidia.com>
  • Loading branch information
tzulingk committed Sep 16, 2025
commit 2659e999dadfef74f3b8592571f64a30981600be
9 changes: 2 additions & 7 deletions lib/runtime/src/pipeline/network/ingress/push_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,12 @@ struct RequestMetricsGuard {
inflight_requests: prometheus::IntGauge,
request_duration: prometheus::Histogram,
start_time: Instant,
health_check_notifier: Option<Arc<tokio::sync::Notify>>,
}
impl Drop for RequestMetricsGuard {
fn drop(&mut self) {
self.inflight_requests.dec();
self.request_duration
.observe(self.start_time.elapsed().as_secs_f64());
// Notify health check manager that inflight requests decreased
if let Some(notifier) = &self.health_check_notifier {
notifier.notify_one();
}
}
}

Expand Down Expand Up @@ -151,7 +146,6 @@ where
inflight_requests: m.inflight_requests.clone(),
request_duration: m.request_duration.clone(),
start_time,
health_check_notifier: self.health_check_notifier.get().cloned(),
}
});

Expand Down Expand Up @@ -320,7 +314,8 @@ where
.inc();
}
}
// Notify health check manager that we're actively processing
// Notify the health check manager that the stream has finished.
// This resets the timer, delaying the next canary health check.
if let Some(notifier) = self.health_check_notifier.get() {
notifier.notify_one();
}
Expand Down