Add bootstrap_room validation to detect metadata corruption in PD disaggregation#17430
Conversation
Store and validate bootstrap_room to detect metadata corruption. Prevents decode server from using wrong metadata by validating bootstrap_room match before committing transfer.
Summary of ChangesHello @Simon-Li, 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 significantly enhances the robustness of the Prefill-Decode disaggregation system by introducing a critical validation mechanism. It prevents metadata corruption, where a decode server might process data from an incorrect request, by verifying the Highlights
🧠 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. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
The pull request introduces a robust mechanism to detect metadata corruption in Prefill-Decode disaggregation mode by validating bootstrap_room during metadata transfer. This is a critical improvement for service quality and data integrity. The changes involve adding a bootstrap_rooms tensor to MetadataBuffers in utils.py and implementing validation logic in decode.py. Overall, the solution addresses the problem effectively with minimal overhead.
|
/tag-and-rerun-ci |
|
Use |
When actual_room == 0, metadata has not arrived yet due to timing. The request should stay in the transfer queue for the next poll instead of being aborted immediately.
Fixed lint issues with black and isort. Ready for review. |
ShangmingCai
left a comment
There was a problem hiding this comment.
Looks good to me. Let's check the CI.
|
/tag-and-rerun-ci |
CI mostly passed. The failing tests look unrelated to the changes. Let me know if you'd like me to investigate any specific failures. |
|
/rerun-failed-ci |
Need to wait for the results of h20, h200, b200 tests. |
|
https://github.com/sgl-project/sglang/actions/runs/21203050166/job/61827774360?pr=17430 The disaggregation basic test has failed. |
|
I have fixed the bug. Let's try another round of CI. |
@ShangmingCai Thanks for the fix! The warmup/fake mode bypass makes sense - I hadn't considered that scenario where no actual metadata transfer occurs. |
…aggregation (sgl-project#17430) Co-authored-by: 继优 <jiyou.ljy@alibaba-inc.com> Co-authored-by: Shangming Cai <csmthu@gmail.com>
…aggregation (sgl-project#17430) Co-authored-by: 继优 <jiyou.ljy@alibaba-inc.com> Co-authored-by: Shangming Cai <csmthu@gmail.com>
…aggregation (sgl-project#17430) Co-authored-by: 继优 <jiyou.ljy@alibaba-inc.com> Co-authored-by: Shangming Cai <csmthu@gmail.com>

For #17259
Summary
Adds proactive detection for context corruption in Prefill-Decode disaggregation mode by validating
bootstrap_roomduring metadata transfer.Problem
Currently, metadata corruption (where decode server receives wrong first token from a different request) can only be detected through customer reports. This:
Motivation
Solution
Store and validate
bootstrap_roomin metadata buffer:Prefill side:
bootstrap_roomin metadata buffer duringset_buf()Decode side:
bootstrap_roommatches before using metadataAccuracy Tests
N/A
Benchmarking and Profiling
N/A
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci