Repository navigation
feat(router): RuntimeIngress feeds the partition's index for the frontend - #43
Closed
ishandhanani wants to merge 1 commit into
Closed
ishandhanani wants to merge 1 commit into
ishandhanani wants to merge 1 commit into
Conversation
…tend KvEventIngress now builds the partition's index (open) as well as feeding it, so KvIndexSource::Owned covers both hosts and Provided goes away: - ZmqDirectIngress opens the registry's index and, on detach, deregisters the worker's listeners or, when there are none (events off or a remote primary), drops the worker from the index: the two behaviors SelectionCore used to branch on itself. - RuntimeIngress (lib/llm/src/kv_router/indexer/ingress.rs) builds the frontend's index from the router config, starts the event-plane subscription with per-rank recovery and the served-indexer endpoint, and hands the index to the partition. Its per-worker hooks are no-ops because membership comes from the KV-source watch. KvRouter::new shrinks to constructing it; task guard and shutdown go through it. The core no longer special-cases a host-fed index anywhere: every Owned index is opened by and detached through its ingress. Signed-off-by: Ishan Dhanani <[email protected]>
ishandhanani
had a problem deploying
to
external_collaborator
September 4, 2026 01:25 — with
GitHub Actions
Failure
ishandhanani
had a problem deploying
to
external_collaborator
September 4, 2026 01:46 — with
GitHub Actions
Failure
ishandhanani
force-pushed
the
idhanani/s1c-runtime-ingress
branch
from
September 4, 2026 01:47
64fef40 to
de30662
Compare
ishandhanani
had a problem deploying
to
external_collaborator
September 4, 2026 01:47 — with
GitHub Actions
Failure
This was referenced Sep 4, 2026
Closed
Owner
Author
This branch had an error being deployed
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.
Stack 1, group C, third slice: closes the "two feeders" gap at the API level. Stacked on #42. DEP #33.
Summary
One logical commit.
KvEventIngressgainsopen, so an ingress builds the partition's index as well as feeding it, andKvIndexSource::Owned(ingress)covers both hosts:ZmqDirectIngress(kv-router):openreturns the registry's index;detachderegisters the worker's listeners, or, when there are none because events are off or the primary is remote, drops the worker from the index. Those are the two branchesSelectionCoreused to keep itself.RuntimeIngress(lib/llm/src/kv_router/indexer/ingress.rs): builds the frontend's index from the router config (component metrics, request-plane remote, LRU retention), starts the runtime event-plane subscription with per-rank recovery and the served-indexer endpoint, and hands the index to the partition. Per-worker hooks are no-ops because membership comes from the KV-source watch.KvRouter::newshrinks to constructing it; task guard and shutdown go through it.KvIndexSource::Providedis removed: no host needs it once its feeder is an ingress.Behavior
Unchanged for both hosts. Same frontend index construction and subscription (the code moved from
KvRouter::new), same standalone listener lifecycle and worker-removal behavior, same schedulability reasons. The recovery state machine still lives inlib/llm; this PR routes it through the trait rather than moving it.Validation
cargo test -p dynamo-kv-router --features standalone-selection --lib -- services::selection: 81 passed.cargo test -p dynamo-llm --lib -- kv_router::: 309 passed.cargo test -p dynamo-ext-proc: 141 passed.cargo clippyfor kv-router (featurestandalone-selection), llm, ext-proc (tests): clean. Bindingscargo check: clean.Review notes (graham-code-review pass)
openis synchronous because the core creates partitions inside aOnceCellinitializer. The frontend therefore builds its index and starts the subscription inRuntimeIngress::startbefore the partition exists; the two never depended on each other.RuntimeIngressholds the subscription handle behind aparking_lot::Mutexonly becauseset_task_guardandshutdowntake&selfthrough anArcthe partition shares; no lock is held across an await.WorkerRegistry::has_workeris the one registry addition; it replaces thelistens_for_kv_eventsbranch in the core's cleanup path.