Merged
Conversation
This change makes the cell flag optional for vtctld. This removes the catch-22 that you have to create a cell before launching vtctld. But then, how do you create a cell without a vtctld? This required a one-time use of vtctl tool to create this initial cell. If you don't specify a cell, vtctld will choose one at random. I believe the main use case for this is for identifying which shards are serving vs. non-serving. This info is now available in global topo itself as the "IsMasterServing" flag. But, we'll need to go into the UI to make this change, which is non-trivial right now. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Also use the API only if localcell is not specified. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
deepthi
reviewed
Apr 27, 2020
| if cell == "local" { | ||
| if *localCell == "" { | ||
| return nil, fmt.Errorf("local cell requested, but not specified. Please set with -cell flag") | ||
| cells, err := ts.GetCellInfoNames(ctx) |
Collaborator
There was a problem hiding this comment.
Does this mean that local is a reserved cell name and no one can use it for their cells? We need to document that.
Contributor
|
I think this will improve the local example code a lot. Let's take a look after Vitess 6, so we can think through it from an examples perspective. |
Contributor
Should this say deterministically and not random? Otherwise LGTM. |
deepthi
approved these changes
Apr 27, 2020
Collaborator
deepthi
left a comment
There was a problem hiding this comment.
LGTM. We need to track the documentation requirement elsewhere.
Collaborator
I suggest |
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.
This change makes the cell flag optional for vtctld. This removes
the catch-22 that you have to create a cell before launching vtctld.
But then, how do you create a cell without a vtctld?
This required a one-time use of vtctl tool to create this initial
cell.
If you don't specify a cell, vtctld will choose one for you.
I believe the main use case for this is for identifying which shards
are serving vs. non-serving. This info is now available in global
topo itself as the "IsMasterServing" flag. But, we'll need to
go into the UI to make this change, which is non-trivial right now.
Signed-off-by: Sugu Sougoumarane ssougou@gmail.com