-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Migrate vtctlclient InitShardMaster
=> vtctldclient InitShardPrimary
#7220
Migrate vtctlclient InitShardMaster
=> vtctldclient InitShardPrimary
#7220
Conversation
40b0f19
to
3e6942d
Compare
// WARNING: This could cause data loss on an already replicating shard. | ||
// PlannedReparentShard or EmergencyReparentShard should be used in those | ||
// cases instead. | ||
rpc InitShardPrimary(vtctldata.InitShardPrimaryRequest) returns (vtctldata.InitShardPrimaryResponse) {}; |
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.
I'm genuinely unsure what the right API here is. Is all we want the stream of updates? Maybe this is a case where we actually want just a stream logutil.Event
response 🤔
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.
I don't know either :) What you have is fine for now and we can fix forward if we decide otherwise.
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 golang parts look good to me! Thank you for doing the rename (and adding tests too, so nice!)
You'll fur sure want Planetscale signoff on the rest, of course. 🎉
In my local environment, the standard protos are under |
3e6942d
to
283db12
Compare
Working updated
|
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
…mples There are no functional changes in this commit, just a pure port with the most minor changes to ensure identical behavior (like the callback logger). I also updated our `proto` target to assume a standard protoc installation (which installs a stdlib of well-known types into /usr/local/include). We can decide if this is okay to make a requirement, or if we should try to make this more portable in PR review. I also updated the local example to use the vtctldclient port, and went through the full example with no issues. 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>
… in dist Signed-off-by: Andrew Mason <amason@slack-corp.com>
f1343d4
to
99b507c
Compare
@@ -12,7 +12,6 @@ import ( | |||
grpc "google.golang.org/grpc" | |||
codes "google.golang.org/grpc/codes" | |||
status "google.golang.org/grpc/status" | |||
|
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.
it looks like the new goimports
style conflicts with how protoc-gen-go
generates files
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.
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>
@ajm188, I reran a flaky test that had failed and now all tests are passing. Is this ready to be merged? |
Yep should be good to go! |
Description
This implements the
InitShardMaster
command in the VtctldServer, renamed asInitShardPrimary
to take advantage of the easy opportunity to rename without backwards compatibility considerations.Some other decisions made in this PR to call out:
--wait-replicas-timeout
flag, which requires inclusion of the standard proto definitions that ship withprotoc
. These usually (and by default I think) end up in/usr/local/include
, so I've taken the (possibly naive!) simple step of updatingmake proto
to add that include path. I'd like to talk about ideas about how to ensure this doesn't break existing developer's workflows, and whether this is portable enough. Like, we could, for example, call this good enough and add a note to the proto readme to ensure you have these files in the right path, or we could make the tooling more dynamic.Related Issue(s)
Checklist
Deployment Notes
None
Impacted Areas in Vitess
Components that this PR will affect: