Skip to content

[GG] fix(sched): tolerate late KV-transfer completions - #196

Merged
lukealonso merged 2 commits into
dev/gilded-gnosisfrom
fix/gg-kv-xfer-late-completion-20260729
Jul 29, 2026
Merged

[GG] fix(sched): tolerate late KV-transfer completions#196
lukealonso merged 2 commits into
dev/gilded-gnosisfrom
fix/gg-kv-xfer-late-completion-20260729

Conversation

@voipmonitor

Copy link
Copy Markdown

Summary

  • tolerate late or duplicate KV receive/send completions for requests that are no longer tracked
  • preserve live request ownership when a stale completion arrives in an unexpected status
  • retain normal cleanup for completed requests

This replaces #192 after its source branch was deleted. It preserves Florian Bernd's original commit and adds the send-side live-request guard requested in review.

Why

LMCache MP with async scheduling can deliver a completion after abort cleanup or report a completion twice. Assertions in the scheduler then terminate EngineCore. A stale send completion must also never free blocks still owned by a running request.

Tests

python3 -m pytest -q tests/v1/kv_connector/unit/test_late_kv_xfer_completions.py

Result: 5 passed.

flobernd and others added 2 commits July 29, 2026 16:17
_update_from_kv_xfer_finished asserted that every finished_recving or
finished_sending request id is still tracked and in an expected status.
A worker-side connector can violate both: an abort can race an async KV
load so the completion arrives after the request was freed, and a
connector can report the same request twice (seen with the LMCache MP
connector under kv_both plus async scheduling; upstream reports in
LMCache/LMCache#2356, partial fix for one producer in
LMCache/LMCache#4136). Each occurrence killed EngineCore with an
AssertionError.

Warn and skip unknown request ids, and skip the block free for a live
request that is neither WAITING_FOR_REMOTE_KVS nor finished, since
freeing the blocks of a live request would corrupt scheduler state.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@voipmonitor, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 27bc1864-f160-41a7-a203-53993ca33095

📥 Commits

Reviewing files that changed from the base of the PR and between 4247d67 and bc5dbf4.

📒 Files selected for processing (2)
  • tests/v1/kv_connector/unit/test_late_kv_xfer_completions.py
  • vllm/v1/core/sched/scheduler.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lukealonso
lukealonso merged commit a6f4a05 into dev/gilded-gnosis Jul 29, 2026
4 of 5 checks passed
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.

3 participants