-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[vtadmin] non-blocking resolver #10205
[vtadmin] non-blocking resolver #10205
Conversation
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>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
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 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. |
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.
A jitterbug?
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.
wham! that was a good one
Description
This PR updates the cluster discovery resolver to make
ResolveNow
a 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 + multiplier
instead of exponential'scur * multiplier
) and "none" (which never backs-off).Related Issue(s)
#9977
Checklist
Deployment Notes