Repository navigation
feat(router): expose an explicit admission barrier - #16490
Merged
Merged
Conversation
Signed-off-by: Harry Lee <harrli@nvidia.com>
This was referenced Oct 15, 2026
Contributor
✅ Dynamo PR CI passed — run 38680261251 (attempt 1) on
|
Harrilee
marked this pull request as ready for review
October 16, 2026 23:05
Contributor
tedzhouhk
approved these changes
Oct 16, 2026
tedzhouhk
left a comment
Contributor
There was a problem hiding this comment.
Reviewed at 85ce615. The explicit admission barrier is a suitable native scheduler interface: it reuses the existing Update/ack mechanism, preserves the no-queue fast path of update(), and leaves capacity-blocked requests pending without adding simulation or policy logic.
Validation: independently ran the scheduling:: suite with standalone-selection on this commit: 270 passed, 0 failed, 1 ignored. Current-head Pre Merge and full CI pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A host driving native scheduling futures needs to know when the admission actor has processed submitted work without waiting for capacity-blocked requests.
LocalScheduler::update_queue()intentionally returns immediately when queueing is disabled, so it cannot provide that guarantee for the default router configuration.Add
SchedulerQueue::admission_barrier()and aLocalSchedulerdelegate. The explicit barrier uses the existing update command and acknowledgement, including cancellation cleanup and ready-work rechecks, and reports actor shutdown as an error. Existing update calls retain their no-queue fast path. Scheduling, selection, capacity, and booking algorithms are unchanged.This small native interface supports AISimulate directly hosting Dynamo's production scheduler instead of copying admission logic into the simulator. It is a prerequisite for the refactoring in AISimulate #306.
Validation
cargo test --locked -p dynamo-kv-router --features standalone-selection --lib scheduling::local::tests: 25 passed.cargo test --locked -p dynamo-kv-router --features standalone-selection --lib scheduling::queue::tests: 54 passed, 1 existing ignored test.Where should the reviewer start?
lib/kv-router/src/scheduling/queue.rsdefines the acknowledgement contract;local.rsexposes it and contains the two behavioral tests.Related Issues
Refs AIC-1817.
Summary by CodeRabbit