-
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
Fixes vttestserver to work with sharded keyspaces #7617
Conversation
…ddl commands Signed-off-by: GuptaManan100 <[email protected]>
4e7e9db
to
3b817a2
Compare
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.
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.
Signed-off-by: GuptaManan100 <[email protected]>
@deepthi I can add the CI test as part of a separate PR. Could we merge this for now? |
That is acceptable. |
Signed-off-by: GuptaManan100 <[email protected]>
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.
LGTM
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_users
flag to run vschema commandsnum_shards
flag, but we weren’t setting up the vschema which led to a wierd problem. When I rancreate table t1
I 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: