Skip to content

Conversation

Abatom
Copy link
Contributor

@Abatom Abatom commented Jul 29, 2025

Using pop alters the original P/D instance order in the dictionary, and the round-robin selection of 1P1D relies on that order, which leads to uneven polling. After replacing pop with get, the unevenness issue has been fixed.

@mergify mergify bot added the documentation Improvements or additions to documentation label Jul 29, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly fixes an uneven polling bug in the example proxy server by changing dict.pop() to dict.get(). This prevents reordering of registered instances and ensures fair round-robin selection. The change is effective and well-targeted.

However, I've identified a critical issue in the surrounding code that could lead to an UnboundLocalError and crash the listener thread if an unexpected message type is received. I've left a detailed comment on this. Addressing this would significantly improve the robustness of the example.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Abatom added 2 commits July 29, 2025 17:57
Signed-off-by: Abatom <[email protected]>
Signed-off-by: Abatom <[email protected]>
@Abatom
Copy link
Contributor Author

Abatom commented Aug 1, 2025

@chaunceyjiang Could you help me review this PR?

@chaunceyjiang
Copy link
Contributor

OK

/assign

Copy link
Contributor

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Your change ensures that the order always follows the first registration, since subsequent registrations only modify the dict's values and don’t affect the keys’ order.

/LGTM

@chaunceyjiang
Copy link
Contributor

@DarkLight1337 PTAL.

@DarkLight1337 DarkLight1337 requested a review from KuntaiDu August 4, 2025 10:15
Copy link
Collaborator

@KuntaiDu KuntaiDu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For toy example this is a good-enough fix so LGTM. We probably need a more formal fix in our future version of router.

@KuntaiDu KuntaiDu enabled auto-merge (squash) August 4, 2025 17:02
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 4, 2025
@KuntaiDu KuntaiDu merged commit c09efff into vllm-project:main Aug 4, 2025
54 checks passed
@Abatom Abatom deleted the xpyd-proxy branch August 4, 2025 22:58
juuice-lee pushed a commit to juuice-lee/vllm-moe.code that referenced this pull request Aug 5, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
myselvess pushed a commit to myselvess/vllm that referenced this pull request Aug 7, 2025
jingyu-ml pushed a commit to jingyu-ml/vllm that referenced this pull request Aug 8, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
noamgat pushed a commit to noamgat/vllm that referenced this pull request Aug 9, 2025
yyihuang pushed a commit to yyihuang/vllm that referenced this pull request Aug 11, 2025
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 13, 2025
taneem-ibrahim pushed a commit to taneem-ibrahim/vllm that referenced this pull request Aug 14, 2025
BoyuanFeng pushed a commit to BoyuanFeng/vllm that referenced this pull request Aug 14, 2025
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 26, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 27, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…y for P2pNcclConnector (vllm-project#21819)"

This reverts commit 9f518af.

Signed-off-by: Xiao Yu <[email protected]>
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…y for P2pNcclConnector (vllm-project#21819)"

This reverts commit 9f518af.

Signed-off-by: Xiao Yu <[email protected]>
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…y for P2pNcclConnector (vllm-project#21819)"

This reverts commit 9f518af.

Signed-off-by: Xiao Yu <[email protected]>
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…y for P2pNcclConnector (vllm-project#21819)"

This reverts commit 9f518af.

Signed-off-by: Xiao Yu <[email protected]>
googlercolin pushed a commit to googlercolin/vllm that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants