-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move name resolution retry from managed channel to name resolver (take #2) #9812
Conversation
This change has these main aspects to it: 1. Removal of any name resolution responsibility from ManagedChannelImpl 2. Creation of a new RetryScheduler to own generic retry logic - Can also be used outside the name resolution context 3. Creation of a new RetryingNameScheduler that can be used to wrap any polling name resolver to add retry capability 4. A new facility in NameResolver to allow implementations to notify listeners on the success of name resolution attempts - RetryingNameScheduler relies on this
- Do not change the public API - Use a hacky internal callback - More unit test coverage
cc: @larry-safran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's two problems not addressed:
- We need a utility for third-party polling NameResolvers to use
- We need to give time for migration. This could be handled by using RetryingNameResolver in ManagedChannelImpl
If we want to implement this over multiple PRs, then ManagedChannelImpl could be the only user of RetryingNameResolver for now and we add the API in a later PR.
core/src/main/java/io/grpc/internal/BackoffPolicyRetryScheduler.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/grpc/internal/BackoffPolicyRetryScheduler.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some changes based on a few assumptions. PTAL and let me know if it doesn't look right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Easy"
This change has these main aspects to it: