Skip to content

Revert "[PD] Make pending reqs resolving more robust"#20779

Merged
ShangmingCai merged 1 commit into
mainfrom
revert-20505-process_pending_async
Mar 17, 2026
Merged

Revert "[PD] Make pending reqs resolving more robust"#20779
ShangmingCai merged 1 commit into
mainfrom
revert-20505-process_pending_async

Conversation

@ShangmingCai
Copy link
Copy Markdown
Collaborator

Reverts #20505

Because the root cause and bugfix are detailed here #20756

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request reverts the changes introduced in a previous PR (#20505) that aimed to enhance the robustness of pending request resolution. The decision to revert was made because the underlying root cause of the issue has been addressed in a separate, more comprehensive bugfix (#20756). Consequently, the retry mechanisms and associated state management for fetching prefill parallel information and resolving pending requests have been removed.

Highlights

  • Reverted Retry Mechanism: The retry logic for fetching prefill parallel information in the ensure_parallel_info method was removed, restoring its original behavior of a single attempt.
  • Removed Pending Request Retry Logic: The mechanism that tracked and retried pending requests based on bootstrap address failures was eliminated, leading to immediate failure if prefill info cannot be fetched.
  • Simplified Error Handling: Error messages related to prefill parallel info fetching failures were streamlined for clarity.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • python/sglang/srt/disaggregation/common/conn.py
    • Removed retry loop and parameters from ensure_parallel_info method.
    • Simplified the failure message passed to record_failure in __init__.
  • python/sglang/srt/disaggregation/decode.py
    • Deleted _bootstrap_addr_retry_count dictionary.
    • Removed the retry and backoff logic within _resolve_pending_reqs, causing immediate abortion of requests if prefill info is unavailable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ShangmingCai
Copy link
Copy Markdown
Collaborator Author

/rerun-stage stage-c-test-8-gpu-h20

@github-actions
Copy link
Copy Markdown
Contributor

✅ Triggered stage-c-test-8-gpu-h20 to run independently (skipping dependencies).

@github-actions
Copy link
Copy Markdown
Contributor

🔗 View workflow run

Copy link
Copy Markdown
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 appears to be a revert of a previous change, effectively refactoring the retry logic for fetching prefill server information. The logic is moved from decode.py back into a centralized ensure_parallel_info method in conn.py. This is a good change as it centralizes the logic and simplifies the calling code. The changes also fix a bug where record_failure was called with an incorrect number of arguments. The overall changes look good and improve code quality.

Comment on lines +186 to +188
def ensure_parallel_info(
self, bootstrap_addr: str, max_retries: int = 5, retry_interval: float = 1.0
) -> bool:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The retry parameters max_retries and retry_interval are hardcoded as default values. It would be more flexible to make them configurable through environment variables, similar to other parameters in this file (e.g., SGLANG_DISAGGREGATION_BOOTSTRAP_TIMEOUT). This would allow for easier tuning in different deployment environments without changing the code.

@ShangmingCai
Copy link
Copy Markdown
Collaborator Author

image

CI has passed.

@ShangmingCai ShangmingCai merged commit 17c81a3 into main Mar 17, 2026
89 of 97 checks passed
@ShangmingCai ShangmingCai deleted the revert-20505-process_pending_async branch March 17, 2026 12:31
xueliangyang-oeuler added a commit to xueliangyang-oeuler/sglang that referenced this pull request Mar 17, 2026
Revert "[PD] Make pending reqs resolving more robust" (sgl-project#20779)
Wangzheee pushed a commit to Wangzheee/sglang that referenced this pull request Mar 21, 2026
0-693 pushed a commit to 0-693/sglang that referenced this pull request Mar 25, 2026
@xueliangyang-oeuler xueliangyang-oeuler mentioned this pull request Mar 26, 2026
5 tasks
JustinTong0323 pushed a commit to JustinTong0323/sglang that referenced this pull request Apr 7, 2026
yhyang201 pushed a commit to yhyang201/sglang that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant