[Fix] rust-server: Answer health probes a busy scheduler skipped on the response ring (#45475)

Co-authored-by: Lu Fang <116399278+luccafong@users.noreply.github.com>
Co-authored-by: shodoco <shodoco@users.noreply.github.com>
This commit is contained in:
metamergebot
2026-10-21 03:41:36 -07:00
committed by GitHub
co-authored by Lu Fang shodoco
parent 5bf10d4c79
commit ca72dad953
8 changed files with 127 additions and 13 deletions
+11 -4
View File
@@ -5108,11 +5108,18 @@ class Scheduler(
# Return some signal for the health check.
# This is used to prevent the health check signal being blocked by long context prefill.
# However, one minor issue is that this code path does not check the status of detokenizer manager.
self.ipc_channels.send_to_tokenizer.send_output(
HealthCheckOutput(
http_worker_ipc=self.return_health_check_ipcs.popleft()
if self.rust_server is not None:
# The zmq tokenizer socket is not consumed in Rust mode. Rust
# probes share one heartbeat, so one acknowledgement answers
# every probe skipped so far.
self.return_health_check_ipcs.clear()
self.rust_server.push_health_ack()
else:
self.ipc_channels.send_to_tokenizer.send_output(
HealthCheckOutput(
http_worker_ipc=self.return_health_check_ipcs.popleft()
)
)
)
def add_external_corpus(
self, recv_req: AddExternalCorpusReqInput
+4
View File
@@ -383,6 +383,10 @@ class RustServer:
self.server.push_control_result(recv_req.rid, encoded)
def push_health_ack(self) -> None:
"""Acknowledge the health probes skipped while the scheduler was busy."""
self.server.push_health_ack()
def push_generation(self, payload: BatchTokenIDOutput) -> None:
"""Egress redirect for generation output (replaces the zmq detokenizer).