core: only let ManagedChannelImpl convert empty resolution result to error#5803
Merged
zhangkun83 merged 2 commits intogrpc:masterfrom May 30, 2019
Merged
core: only let ManagedChannelImpl convert empty resolution result to error#5803zhangkun83 merged 2 commits intogrpc:masterfrom
zhangkun83 merged 2 commits intogrpc:masterfrom
Conversation
…error Previously, AutoConfiguredLoadBalancer was also handling it, but it doesn't trigger retries. By returning true for canHandleEmptyAddressListFromNameResolution(), AutoConfiguredLoadBalancer effectively by-passed the empty-result handling logic in ManagedChannelImpl, thus resolution retries were never triggered. This change requires AutoConfiguredLoadBalancer to stop being a LoadBalancer, for its tryHandleResolvedAddresses(). It has been sliding away from the standard LoadBalancer interface anyway.
| @Deprecated | ||
| @Override | ||
| public void handleSubchannelState(Subchannel subchannel, ConnectivityStateInfo stateInfo) { | ||
| void handleSubchannelState(Subchannel subchannel, ConnectivityStateInfo stateInfo) { |
Contributor
There was a problem hiding this comment.
why cant this be removed yet?
Contributor
Author
There was a problem hiding this comment.
LoadBalancers still using the old createSubchannel() will still receive subchannel state updates from this path. It will be removed once LoadBalancer#handleSubchannel is removed.
ejona86
approved these changes
May 30, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Previously, AutoConfiguredLoadBalancer was also handling it, but it
doesn't trigger retries. By returning true for
canHandleEmptyAddressListFromNameResolution(),
AutoConfiguredLoadBalancer effectively by-passed the empty-result
handling logic in ManagedChannelImpl, thus resolution retries were
never triggered.
This change requires AutoConfiguredLoadBalancer to stop being a
LoadBalancer, for its tryHandleResolvedAddresses(). It doesn't
cause any trouble because AutoConfiguredLoadBalancer has become
less and less like a LoadBalancer during the service config changes.
Resolves #5692