Fix num running requests (load) wrong cleared for ongoing requests (#15116)

This commit is contained in:
fzyzcjy
2025-12-15 17:40:04 +08:00
committed by GitHub
parent 2ea844ec81
commit 89ad390843

View File

@@ -427,10 +427,6 @@ impl WorkerRegistry {
let mut interval =
tokio::time::interval(tokio::time::Duration::from_secs(check_interval_secs));
// Counter for periodic load reset (every 10 health check cycles)
let mut check_count = 0u64;
const LOAD_RESET_INTERVAL: u64 = 10;
loop {
interval.tick().await;
@@ -458,15 +454,6 @@ impl WorkerRegistry {
})
.collect();
futures::future::join_all(health_futures).await;
// Reset loads periodically
check_count += 1;
if check_count.is_multiple_of(LOAD_RESET_INTERVAL) {
tracing::debug!("Resetting worker loads (cycle {})", check_count);
for worker in &workers {
worker.reset_load();
}
}
}
});