Skip to content

[BugFix] scheduler: Fix ordering preserving of skipped requests#32173

Merged
njhill merged 1 commit intovllm-project:mainfrom
orozery:sched-fix-skipped-requests-order
Jan 12, 2026
Merged

[BugFix] scheduler: Fix ordering preserving of skipped requests#32173
njhill merged 1 commit intovllm-project:mainfrom
orozery:sched-fix-skipped-requests-order

Conversation

@orozery
Copy link
Copy Markdown
Collaborator

@orozery orozery commented Jan 12, 2026

This PR fixes the order preserving of requests skipped by the scheduler.
A unit test is added to verify the fix.

I came across this bug while testing #29087, and the test there requires this fix.


Note

Cursor Bugbot is generating a summary for commit 8c08c30fef37d620043c4221960e04d6704ba1dc. Configure here.


Note

Fixes request ordering when skipped requests are re-queued.

  • Update FCFSRequestQueue.prepend_requests to extendleft(requests) (remove reverse) to maintain original order when prepending
  • Remove unused __reversed__ definitions from request queues
  • Add test_prepend_skipped_requests_order to verify waiting order is preserved when some requests wait for remote KVs

Written by Cursor Bugbot for commit 8c08c30fef37d620043c4221960e04d6704ba1dc. This will update automatically on new commits. Configure here.


Note

Ensures scheduler preserves request order when skipped requests are re-queued.

  • Update FCFSRequestQueue.prepend_requests to prepend without reversing to maintain original order
  • Remove unused __reversed__ definitions from RequestQueue, FCFSRequestQueue, and PriorityRequestQueue
  • Add test_prepend_skipped_requests_order to verify waiting order is preserved when some requests wait for remote KVs

Written by Cursor Bugbot for commit bc525fcc2dbb1c060a48b593dfab8d93d2d8697b. This will update automatically on new commits. Configure here.


Note

Ensures the scheduler preserves waiting order when skipped requests are re-queued.

  • Update FCFSRequestQueue.prepend_requests to prepend without reversing to maintain original waiting order
  • Remove unused __reversed__ from RequestQueue, FCFSRequestQueue, and PriorityRequestQueue
  • Add test_prepend_skipped_requests_order to verify waiting order is preserved when some requests wait for remote KVs

Written by Cursor Bugbot for commit 43019fa. This will update automatically on new commits. Configure here.

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 correctly fixes a bug where the order of skipped requests was not preserved by the scheduler. The fix involves changing the implementation of FCFSRequestQueue.prepend_requests to correctly handle the reversed order of skipped requests. The removal of the now-unused __reversed__ method is a good cleanup. I have one suggestion to improve the clarity of the prepend_requests method's docstring to prevent potential confusion in the future, as its behavior regarding ordering might be unexpected.

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 12, 2026

Hi @orozery, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@orozery orozery force-pushed the sched-fix-skipped-requests-order branch from 8c08c30 to bc525fc Compare January 12, 2026 12:19
This commit fixes the order preserving of requests skipped by the scheduler.
A unit test is added to verify the fix.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
@orozery orozery force-pushed the sched-fix-skipped-requests-order branch from bc525fc to 43019fa Compare January 12, 2026 12:45
@njhill njhill added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 12, 2026
@njhill njhill enabled auto-merge (squash) January 12, 2026 16:53
@njhill njhill merged commit 2be765b into vllm-project:main Jan 12, 2026
50 checks passed
TomerBN-Nvidia pushed a commit to TomerBN-Nvidia/vllm that referenced this pull request Jan 13, 2026
…-project#32173)

Signed-off-by: Or Ozeri <oro@il.ibm.com>
Signed-off-by: Tomer Natan <tbarnatan@computelab-frontend-8.nvidia.com>
sammysun0711 pushed a commit to sammysun0711/vllm that referenced this pull request Jan 16, 2026
akh64bit pushed a commit to akh64bit/vllm that referenced this pull request Jan 16, 2026
dsuhinin pushed a commit to dsuhinin/vllm that referenced this pull request Jan 21, 2026
…-project#32173)

Signed-off-by: Or Ozeri <oro@il.ibm.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants