-
Notifications
You must be signed in to change notification settings - Fork 137
fix(zmq): correct transport-identity leaks in metrics, admin, and PD paths #2065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1971,6 +1971,12 @@ impl ProtoStream { | |
| .next() | ||
| .await | ||
| .map(|result| result.map(|r| ProtoGenerateResponse::TokenSpeed(Box::new(r)))), | ||
| // Every ZMQ engine (including TokenSpeed) emits vllm-shaped | ||
| // responses: the adapter translates wire output into | ||
| // `vllm::GenerateResponse`, so variant checks like | ||
| // `is_tokenspeed()` on a response are unreliable for ZMQ-backed | ||
| // streams. Key response-side engine logic on the worker's | ||
| // `runtime_type()`, never on the response variant. | ||
|
Comment on lines
+1974
to
+1979
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n -C 6 \
'is_tokenspeed|ProtoResponseVariant::|into_response\(\)' \
model_gateway/src || trueRepository: smg-project/smg Length of output: 50372 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
echo "Changed files:"
git diff --name-only || true
echo
echo "proto_wrapper proto_variant definitions/context:"
rg -n -C 8 'enum ProtoGenerateResponse|is_tokenspeed|ProtoResponseVariant|into_response|self::ProtoGenerateResponse::|ProtoGenerateResponse::' model_gateway/src/routers/grpc/proto_wrapper.rs || true
echo
echo "Search response variant engine dispatches across model_gateway:"
rg -n 'is_tokenspeed\(\)|is_vllm\(\)|ProtoGenerateResponse::|runtime_type\(\)' model_gateway/src \
--glob '*.rs' \
|| true
echo
echo "ProtoStream Zmq implementation context:"
rg -n -C 10 'enum ProtoStream|ProtoStream::Zmq|Zmq|ProtoGenerateResponse::Vllm|generate_stream|into_stream' model_gateway/src/routers/grpc/proto_wrapper.rs || trueRepository: smg-project/smg Length of output: 17467 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
echo "Response variant dispatch sites with engine branching:"
for f in \
model_gateway/src/routers/grpc/harmony/streaming.rs \
model_gateway/src/routers/grpc/regular/streaming.rs \
model_gateway/src/routers/grpc/common/response_formatting.rs
do
if [ -f "$f" ]; then
echo "===== $f ====="
rg -n -C 12 'is_vllm\(\)|is_tokenspeed\(\)|ProtoGenerateStreamChunk|ProtoGenerateComplete|runtime_type' "$f" \
|| true
fi
done
echo
echo "Callers of ProtoStream next and runtime_type context:"
rg -n -C 8 'ProtoStream::|proto_stream|\.next\(\)|runtime_type\(\)|disaggregated_runtime_type' model_gateway/src/routers/grpc \
--glob '*.rs' \
| sed -n '1,260p'Repository: smg-project/smg Length of output: 30556 🔴 Important: ZMQ response consumers still branch by response variant.
🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| Self::Zmq(stream) => stream | ||
| .next() | ||
| .await | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.