-
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
[vtadmin] create+delete shards #9012
Conversation
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.
If you get a chance, can you merge in main
+ push it up? I want to make sure it'll run the new check from #8993. (Kinda funny that it has to be on the branch to run, but I guess I get it!)
go/vt/vtadmin/api.go
Outdated
@@ -260,6 +262,29 @@ func (api *API) CreateKeyspace(ctx context.Context, req *vtadminpb.CreateKeyspac | |||
}, nil | |||
} | |||
|
|||
// CreateShard is part of the vtadminpb.VTAdminServver interface. |
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.
Typo: Servver
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.
the extra v is for .... vtadmin (thanks 😅 )
shards[i] = fmt.Sprintf("%s/%s", shard.Keyspace, shard.Name) | ||
} | ||
|
||
sort.Strings(shards) |
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.
Is there a need to check for duplicate shards either here or in grpcvtctldclient?
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.
we can de-dupe here, but it shouldn't matter because it's safe to delete the same shard over and over
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.
oh i forgot, we de-dupe at the http layer: https://github.com/vitessio/vitess/pull/9012/files#diff-e0e3972839d7d9989a2d71588588ee8b74d574de94295aadc35c9ccccdb04207R72-R74 which i think is Good Enough ™️
sorry, just got back to this, doing it now!! |
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
… tests Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
5e1887d
to
406bb1b
Compare
Description
This adds
CreateShard
andDeleteShards
api endpoints to vtadmin. It also enhances (in a gross way) the testutil package to allow us to exercise code from the cluster down through the grpcvtctldserver (rather than stopping at the client interface boundary as we have up to this point), using the in-process localvtctldclient added in #8882A brief demonstration
Related Issue(s)
#8732
#8740
Checklist
Deployment Notes