[vtadmin] Remove explicit Dial-ing for vtctldclient proxy#10233
Merged
ajm188 merged 6 commits intovitessio:mainfrom May 9, 2022
Merged
[vtadmin] Remove explicit Dial-ing for vtctldclient proxy#10233ajm188 merged 6 commits intovitessio:mainfrom
ajm188 merged 6 commits intovitessio:mainfrom
Conversation
added 6 commits
May 7, 2022 09:11
Signed-off-by: Andrew Mason <andrew@planetscale.com>
….New 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>
3 tasks
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
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
Okay!! This is something I've wanted to do since #9977; since, for a given proxy, grpc will keep going back to the discovery to get a fresh address list, there's no need for us to provide Dial/Close semantics and do any sort of manual futzing around ourselves (see the large amount of deletions of
if err := vtctld.Dial(...); err != nilthis removes for just how much we previously had to care about this).This sets up a bunch of prep work and then finally changes
vtctldclient.Newto Dial once on startup. Then, every cluster/api method will assume each vtctld has a connection (or if not, we're in transient failure and grpc will either fix it in time or we fail the request -- this is consistent with current behavior).The only functional difference is that
Closenow really, truly, permanently closes a proxy. You need toNewup another one, since you can't callDialon it (the method is now private)change breakdown
vtctldclient.NewDialfrom the interfacetesting
-count=50and-raceso i'm feeling good)Related Issue(s)
Checklist
Deployment Notes