-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
[Bugfix] V1 Fix the cursor leakage issue during request scheduling. #21173
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: CLFutureX <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request aims to fix a bug in the scheduler where requests could be missed during preemption. The proposed logic correctly identifies the condition for adjusting the loop cursor. However, the implementation contains a critical bug that will cause a TypeError
at runtime when trying to find the index of the preempted request. I've provided a suggestion to fix this issue.
👋 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 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 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CLFutureX, good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @WoosukKwon to confirm
2100ff3
to
a352810
Compare
@CLFutureX would you mind rebasing on latest |
1fc2ec2
to
b60dc81
Compare
Signed-off-by: CLFutureX <[email protected]>
Signed-off-by: CLFutureX <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Can we add a test about this?
yes, I'm sorry. I accidentally rebased the code onto the wrong branch yesterday, but I've since reverted it and adjusted the branch properly. |
Background: When iterating through running requests, if preemption occurs and the preempted request is before the current cursor req_index, subsequent requests will be missed during scheduling.
Solution: When the preempted request is determined to be before the current cursor req_index, adjust the cursor to move forward to avoid missing requests.