From c09efff9767ad26ecf99a6e6c13243612c278df3 Mon Sep 17 00:00:00 2001 From: Zhonghua Deng Date: Tue, 5 Aug 2025 04:17:05 +0800 Subject: [PATCH] [Bugfix][V1][P/D]Fix the uneven polling issue in the toy proxy for P2pNcclConnector (#21819) Signed-off-by: Abatom --- .../disagg_proxy_p2p_nccl_xpyd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/online_serving/disaggregated_serving_p2p_nccl_xpyd/disagg_proxy_p2p_nccl_xpyd.py b/examples/online_serving/disaggregated_serving_p2p_nccl_xpyd/disagg_proxy_p2p_nccl_xpyd.py index 73da7af85f1d..0c7d32d7862e 100644 --- a/examples/online_serving/disaggregated_serving_p2p_nccl_xpyd/disagg_proxy_p2p_nccl_xpyd.py +++ b/examples/online_serving/disaggregated_serving_p2p_nccl_xpyd/disagg_proxy_p2p_nccl_xpyd.py @@ -46,7 +46,7 @@ def _listen_for_register(poller, router_socket): global prefill_instances global prefill_cv with prefill_cv: - node = prefill_instances.pop(data["http_address"], None) + node = prefill_instances.get(data["http_address"], None) prefill_instances[data["http_address"]] = ( data["zmq_address"], time.time() + DEFAULT_PING_SECONDS, @@ -57,7 +57,7 @@ def _listen_for_register(poller, router_socket): global decode_instances global decode_cv with decode_cv: - node = decode_instances.pop(data["http_address"], None) + node = decode_instances.get(data["http_address"], None) decode_instances[data["http_address"]] = ( data["zmq_address"], time.time() + DEFAULT_PING_SECONDS, @@ -69,6 +69,7 @@ def _listen_for_register(poller, router_socket): remote_address, data, ) + return if node is None: print(f"🔵Add [HTTP:{data['http_address']}, ZMQ:{data['zmq_address']}]")