-
Notifications
You must be signed in to change notification settings - Fork 203
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
Document VStream #1216
Document VStream #1216
Conversation
✅ Deploy Preview for vitess ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
And the new vstream copy resume work added in: vitessio/vitess#11103 Signed-off-by: Matt Lord <[email protected]>
d2221b8
to
f7b498d
Compare
Signed-off-by: Matt Lord <[email protected]>
f7b498d
to
7d451a4
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.
Great, we have been missing such a doc for VStream ...
Have suggested some changes/additions.
e, err := reader.Recv() | ||
... | ||
``` | ||
|
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.
Do we want to talk about the MySQL interface? It is not really a VStream API functionality, it is hacky and has minimal use/support ... We also don't want anyone to start depending on it.
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 think it's useful for debugging/testing. That's why I only call it out in that section.
Signed-off-by: Matt Lord <[email protected]>
Just FYI, I'm going to try and finish this out tomorrow. I'll make some additions/changes based on @rohit-nayak-ps's feedback. |
Signed-off-by: Matt Lord <[email protected]>
980898b
to
84c70b5
Compare
Signed-off-by: Matt Lord <[email protected]>
be5f929
to
483e371
Compare
@mattlord Hi. As to vitessio/vitess#11909 (comment), is something missing in this request? commitCommit: 241e00346d3bc7ce592b1d36f0d47389e92905b5 (HEAD -> vstream_docs)
Author: yoheimuta <[email protected]>
Date: 2022-12-14 19:15:29 +0900 (2 weeks ago)
Add info about the new ability to copy all tables in a keyspace or all tables in all keyspaces. It's added in https://github.com/vitessio/vitess/pull/11909
---
.../en/docs/16.0/reference/vreplication/vstream.md | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/content/en/docs/16.0/reference/vreplication/vstream.md b/content/en/docs/16.0/reference/vreplication/vstream.md
index 5f714c74..95a9f6d8 100644
--- a/content/en/docs/16.0/reference/vreplication/vstream.md
+++ b/content/en/docs/16.0/reference/vreplication/vstream.md
@@ -97,6 +97,37 @@ for {
...
+### Copy all tables in a keyspace
+```
+vgtid := &binlogdatapb.VGtid{
+ ShardGtids: []*binlogdatapb.ShardGtid{{
+ Keyspace: "ks",
+ Gtid: "",
+ }},
+}
+filter := &binlogdatapb.Filter{
+ Rules: []*binlogdatapb.Rule{{
+ Match: "/.*/",
+ }},
+}
+reader, err := gconn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, flags)
+```
+
+### Copy all tables in all keyspaces
+```
+vgtid := &binlogdatapb.VGtid{
+ ShardGtids: []*binlogdatapb.ShardGtid{{
+ Gtid: "",
+ }},
+}
+filter := &binlogdatapb.Filter{
+ Rules: []*binlogdatapb.Rule{{
+ Match: "/.*/",
+ }},
+}
+reader, err := gconn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, flags)
+```
+
## Debugging
There is also an SQL interface that can be used for testing and debugging from a `vtgate`. Here's an example: |
@yoheimuta I've added you as a collaborator on the website repo so you should be able to open PRs directly against the repo and push commits to PRs like this one. In this specific case though... I'm not 100% sure that will be the final syntax but I think it probably will. Our options are to include it in this one or do it separately. At this point it's a matter of timing: if the PR gets approved before this is merged then makes sense to include it. If not, then we can do it in a separate PR. Thanks! |
c8118a1
to
6b86de9
Compare
Signed-off-by: Matt Lord <[email protected]>
6b86de9
to
83c7e99
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.
lgtm
@mattlord, since vitessio/vitess#11909 is still in progress, maybe we can remove it from the description and merge this now and document it in a separate PR. |
Sounds good. I'll remove it from the description here and we'll do a follow-up. Thanks! |
And the new vstream copy resume work added in:
Quick link: https://deploy-preview-1216--vitess.netlify.app/docs/16.0/reference/vreplication/vstream/
Signed-off-by: Matt Lord [email protected]