Pass in cell to EnsureVSchema and GetOrCreateShard#5930
Pass in cell to EnsureVSchema and GetOrCreateShard#5930rafael merged 7 commits intovitessio:masterfrom
Conversation
6109866 to
29b8e36
Compare
go/vt/topo/vschema.go
Outdated
There was a problem hiding this comment.
What if we change EnsureVSchema to accept a cells list to rebuild, and we have each tablet rebuild only its own cell? Would that still have caused the problem you had?
There was a problem hiding this comment.
Oh, I like that a lot more. It still does the nice thing for single cell setups, with the benefit of being easier to reason about overall. I'll switch to that approach!
That would've been fine. The problem was that the tablet in the init loop wasn't just rebuilding its own cell it was rebuilding all the other cells.
a70acbf to
97268cb
Compare
rafael
left a comment
There was a problem hiding this comment.
Maggie this is looking great. I added minor comments.
There was a problem hiding this comment.
This seems like it should not be removed right?
go/vt/topo/vschema.go
Outdated
enisoc
left a comment
There was a problem hiding this comment.
LGTM with one optional suggestion.
go/vt/vtctl/vtctl.go
Outdated
There was a problem hiding this comment.
I think we could also just pass an empty cells list to mean "all cells", since RebuildSrvVSchema already knows how to expand that by doing this same thing.
f927513 to
c2deff9
Compare
Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
Remove empty line. Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
4f5ded2 to
72e75c1
Compare
This test hasn't been flaky. Does it pass for you locally? |
c0f1f4e to
aadd900
Compare
throw an error Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
aadd900 to
f8edec4
Compare
| require.Nil(t, err) | ||
|
|
||
| replicaTabletArgs := commonTabletArg | ||
|
|
There was a problem hiding this comment.
@zmagg and I discussed this. It seems like this was a flaky test. The following change addresses that problem.
…ema_no_multicell Pass in cell to EnsureVSchema and GetOrCreateShard
Description
Modifies
EnsureVSchemaso that we always pass in a cell and it rebuilds SrvVSchema only in the provided cell. This removes its auto-rebuild of all cells automatically when you're creating a new shard or keyspace.Background
During a setup of a new region, we had a misconfigured topology and spinning up a new shard caused us to corrupt all cells in the topology, just as part of booting up a new tablet. For safety reasons, it seems better to decouple spinning up a new shard from rebuilding SrvVSchema on all cells. As talked about in person a few weeks ago--we'll keep the rebuild for the simple case where there's only one cell.
Signed-off-by: Maggie Zhou mzhou@slack-corp.com