Repository navigation
[Bugfix][Rust Frontend] Decode current NIXL connector stats - #60856
Merged
BugenZhao merged 5 commits intoOct 27, 2026
Merged
Conversation
Assisted-by: OpenAI Codex Signed-off-by: Markov Ilya <markovilya197@gmail.com>
Assisted-by: OpenAI Codex Signed-off-by: Markov Ilya <markovilya197@gmail.com>
ilmarkov
marked this pull request as ready for review
October 9, 2026 21:12
6 tasks done
6 tasks done
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
BugenZhao
approved these changes
Oct 26, 2026
Member
There was a problem hiding this comment.
Thanks @ilmarkov!
Shall we remove #[serde(deny_unknown_fields)] on pub struct XxxStats { so that a new field doesn't break the decoding of the entire stats?
I've done this but failed to push to your PR :) BugenZhao@8bb27bd
Signed-off-by: Markov Ilya <markovilya197@gmail.com>
Python adds counters to the NIXL and Mooncake stats payloads over time. With deny_unknown_fields, one new counter made the typed decode fail and silently dropped every metric of that connector, and of its MultiConnector siblings, until Rust caught up. The untagged variants stay distinct through the fields each one requires. Signed-off-by: Bugen Zhao <i@bugenzhao.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K2SEJPm2Mawmm6pu8m9E1o
Contributor
Author
|
@BugenZhao Done, thanks! |
BugenZhao
approved these changes
Oct 27, 2026
Member
|
/ci run |
|
✅ @ilmarkov, CI is now available for this PR.
|
|
✅ Triggered Buildkite CI #97523 for commit ℹ️ This PR is 52 commits behind upstream |
Micador
pushed a commit
to Micador/vllm
that referenced
this pull request
Oct 27, 2026
…ject#60856) Signed-off-by: Markov Ilya <markovilya197@gmail.com> Signed-off-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai> Signed-off-by: Christopher Mackenzie <christopher.mackenzie.software@gmail.com>
BugenZhao
added a commit
to BugenZhao/vllm
that referenced
this pull request
Oct 28, 2026
Resolve conflicts mechanically: keep both the sleep-state metric from vllm-project#63959 and the KV-fetch stage metric, and keep both stats decoding tests (vllm-project#60856). Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Rust's strict
NixlStatsdecoder rejected two fields emitted by current Python NIXL stats. InMultiConnectorpayloads, that caused the NIXL child to be treated as opaque data, so the Rust metrics recorder dropped its transfer histograms. The recorder also omitted handshake/notification failures from the combined failure counter and did not export late notifications.Claims
MultiConnectorstats while retaining compatibility with payloads that omit newer fields.vllm:nixl_num_notifications_after_expiryfrom the Rust frontend.Validation
cargo test --manifest-path rust/Cargo.toml -p vllm-engine-core-client kv_connector_stats_are_recorded_into_mooncake_and_nixl_metrics— passed (1 test); verifies the combined failure count and late-notification counter.cargo test --manifest-path rust/Cargo.toml -p vllm-engine-core-client python_msgpack_fixtures_match_rust_encoding_and_record_nixl_metrics— passed (1 test); decodes the Python-generated fixture and checks rendered failure, expiry, and histogram metrics.cargo fmt --manifest-path rust/Cargo.toml --all --check,git diff --check, and commit pre-commit hooks — passed.Details
EngineCore sends
MultiConnectorstats as a map from connector class name to its stats payload. Current Python NIXL stats includenum_failed_handshakesandnum_notifications_after_expiry; the RustNixlStatsuseddeny_unknown_fieldsbut did not declare these fields. Serde therefore rejected the typed NIXL child, the flattenedothermap retained it as opaque data, and the recorder ignored it.The relevant flow is: (1) the P/D connector accumulates transfer and notification outcomes, (2) EngineCore serializes connector stats into the
MultiConnectorMessagePack payload, and (3) the Rust frontend decodes NIXL stats and records the matching Prometheus metrics. Adding the missing fields with defaults keeps older payloads compatible. The recorder now groups transfer, handshake, and notification failures under the existing failed-transfer counter, keeps the dedicated notification-failure counter for compatibility, and records notifications received after expiry separately.The regression extends the Python-generated MessagePack fixture and asserts the decoded fields and rendered counters, including a failed handshake, a failed notification, and two notifications after expiry.
Pull Request Checklist
I used vLLM's
/pr-checklistskill.AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: The focused Rust tests pass; the live Rust/Python NIXL smoke comparison remains required before this PR is ready for upstream review.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
AI assistance was used. The human submitter must review every changed line and confirm the live P/D smoke comparison before marking this PR ready for review.
BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)