-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
core: Apply RetryingNameResolver in ManagedChannelImpl #10371
Conversation
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
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.
This also fixes the same issue with GoogleCloudToProdNameResolver
. Long-term we may wrap things again, but this is a small change that gets things working again while we figure out the appropriate migration strategy.
GrpcUtil.SHARED_CHANNEL_EXECUTOR, | ||
Stopwatch.createUnstarted(), | ||
IS_ANDROID); | ||
// return new RetryingNameResolver( |
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.
This is a bit strange. Remove it or add a comment?
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.
That was an oversight, removed.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the DnsNameResolver in DnsNameResolverProvider can cause problems to external name resolvers that delegate to a DnsResolver already wrapped in RetryingNameResolver. ManagedChannelImpl would end up wrapping these name resolvers again, causing an exception later from a RetryingNameResolver safeguard that checks for double wrapping.
Wrapping the
DnsNameResolver
inDnsNameResolverProvider
can cause problems to external name resolvers that delegate to aDnsResolver
already wrapped in aRetryingNameResolver
.ManagedChannelImpl
would end up wrapping these name resolvers again, causing an exception later from aRetryingNameResolver
safeguard that checks for double wrapping.This removes the wrapping logic from
DnsNameResolverProvider
and hasManagedChannelImpl
always explicitly do it.