Repository navigation
feat(global-router): keep pool load tied to a Relay replica - #17686
Conversation
Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Source-aware signal storage and selection lib/global-router/src/signals.rs, lib/global-router/src/lib.rs, lib/global-router/src/affinity.rs |
PoolSignals stores load and KV reports by Relay runtime ID and incarnation. Occupancy uses the newest eligible load report and KV data from the same source. Tests cover replica selection, expiry, and incarnation changes. |
Relay subscription lifecycle lib/global-frontend/src/relay.rs |
follow_relays tracks each subscription's Relay URL and model. It cancels and awaits tasks for changed subscriptions before forgetting pool signals, then starts one subscription task for each wanted pool. |
Combined stream and validated updates lib/global-frontend/src/relay.rs |
stream_pool subscribes to serving and KV load over one connection. Update recorders validate the protocol envelope, require Relay identity, and skip incomplete reports. Tests cover envelope validation, identity matching, and the shared connection. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Merge Risk: 
Minimal · up to 4ed2b
-
No actionable issue is established for the documented deployment. Normal validation can proceed before merge.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "feat(global-router): keep pool load tied to a Relay replica" matches the main change. The PR keeps load reports separate per Relay replica (RelaySource with runtime ID and incarnation), pairs serving load with KV load from the same replica, and selects one fresh replica view. The title names the Global Router scope and the core idea. It is concise, specific, and uses the conventional commit format.
Full details: Description check
-
Explanation
The description follows the repository template with Overview, Key Changes, Validation, Issues and Ongoing Work, and the checklist. It explains the goal of keeping each active-active PoolRelay replica's reports separate, pairing serving load with KV load from the same replica, and choosing one fresh replica view. Key Changes list the replica tracking, same-replica load usage, and stale-subscription handling. Validation gives a concrete test command with 31 passing tests and describes the real TCP/gRPC frontend test. The main gap is the unfilled issue link: 'Closes
#XXXX' is a placeholder. The template marks this link check as advisory today, so the gap does not block the description from being mostly complete.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 4 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
✅ Dynamo PR CI passed — run 41079838370 (attempt 1) on
|
Signed-off-by: Hannah Zhang <hannahz@nvidia.com>
Overview
When multiple active-active PoolRelay Pods report on that same pool, this change keeps each Pod's reports separate, pairs serving load with KV load from the same Pod, and chooses one fresh view. Builds on #17524, which made Global Router use reported load when choosing a pool.
Key Changes
Validation
cargo test -p dynamo-global-frontend -p dynamo-global-router --lib --jobs 8: 31 passed.Issues and Ongoing Work
Pull Request Checklist
/pr-checklistskill.Summary by CodeRabbit