Fixes vttestserver to work with sharded keyspaces#7617
Merged
deepthi merged 3 commits intovitessio:masterfrom Mar 5, 2021
Merged
Fixes vttestserver to work with sharded keyspaces#7617deepthi merged 3 commits intovitessio:masterfrom
deepthi merged 3 commits intovitessio:masterfrom
Conversation
…ddl commands Signed-off-by: GuptaManan100 <manan@planetscale.com>
4e7e9db to
3b817a2
Compare
deepthi
reviewed
Mar 5, 2021
Collaborator
deepthi
left a comment
There was a problem hiding this comment.
How do you feel about writing a CI test for this that runs in docker?
Right now we have a unit test (in go/cmd/vttestserver) and an endtoend test (vttest_sample). Neither of them runs in docker.
Contributor
Author
|
@deepthi I can add the CI test as part of a separate PR. Could we merge this for now? |
Collaborator
That is acceptable. |
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Contributor
Author
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
Adds vschema to the vttestserver image so that it works correcly for the sharded keyspaces too. It also authorizes all users for ddl commands
vschema_ddl_authorized_usersflag to run vschema commandsnum_shardsflag, but we weren’t setting up the vschema which led to a wierd problem. When I rancreate table t1I got the errorKeyspace does not have exactly one shard: [0xc000513100 0xc000513120]This happened because the vschema was not setup and the vtgate assumed that the keyspace was unsharded. This PR fixes it by setting up a minimalistic vschema whenever the number of shards are more than 1.Related Issue(s)
Checklist
Impacted Areas in Vitess
Components that this PR will affect: