Skip to content

feat: Block startup until route provider is healthy#186

Merged
shilingwang merged 4 commits intomainfrom
shiling/router
Mar 23, 2026
Merged

feat: Block startup until route provider is healthy#186
shilingwang merged 4 commits intomainfrom
shiling/router

Conversation

@shilingwang
Copy link
Copy Markdown
Contributor

Summary

setup_route_provider now waits until the route provider reports healthy before returning, ensuring downstream consumers always receive a fully initialized provider.

Health is polled every second using the existing RouteProviderWrapper::healthy() logic (at least one healthy node for dynamic providers; always passes for static RoundRobinRouteProvider).
A 2-minute timeout is enforced via tokio::time::timeout; if the provider has not become healthy within that window, the function returns an error.

@shilingwang shilingwang marked this pull request as ready for review March 20, 2026 13:26
@shilingwang shilingwang requested a review from a team as a code owner March 20, 2026 13:26
@shilingwang shilingwang merged commit 879adef into main Mar 23, 2026
6 checks passed
@shilingwang shilingwang deleted the shiling/router branch March 23, 2026 08:28
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.

2 participants