[vtadmin] non-blocking resolver#10205
Merged
ajm188 merged 8 commits intovitessio:mainfrom May 3, 2022
Merged
Conversation
added 8 commits
May 2, 2022 09:01
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
doeg
approved these changes
May 3, 2022
Contributor
doeg
left a comment
There was a problem hiding this comment.
This looks good to me, though I admit I don't really use channels enough to have a good intuition for them.
I deployed this internally and it works great. ✅
|
|
||
| // NOTE: We differ from grpc's exponential backoff here, which actually can | ||
| // jitter to a backoff that exceeds the config's MaxDelay, which in my (ajm188) | ||
| // opinion is a bug. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR updates the cluster discovery resolver to make
ResolveNowa non-blocking call, by signaling on a channel to watcher goroutine which is continually updating the address list for a cluster component with backoff on failure. It's largely a port of grpc-go's dns-resolver with the "do a dns lookup" replaced with "make a discovery call". (See dns_resolver for reference).The only notable changes are:
cur + multiplierinstead of exponential'scur * multiplier) and "none" (which never backs-off).Related Issue(s)
#9977
Checklist
Deployment Notes