Skip to content
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

Merged
merged 7 commits into from
Jan 7, 2023
Merged

Document VStream #1216

merged 7 commits into from
Jan 7, 2023

Conversation

@netlify
Copy link

netlify bot commented Nov 8, 2022

Deploy Preview for vitess ready!

Name Link
🔨 Latest commit 83c7e99
🔍 Latest deploy log https://app.netlify.com/sites/vitess/deploys/63af2bd46a070d0008e616e5
😎 Deploy Preview https://deploy-preview-1216--vitess.netlify.app/docs/16.0/reference/vreplication/vstream
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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]>
@mattlord mattlord force-pushed the vstream_docs branch 2 times, most recently from d2221b8 to f7b498d Compare November 8, 2022 01:40
Signed-off-by: Matt Lord <[email protected]>
Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps left a 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.

content/en/docs/16.0/reference/vreplication/vstream.md Outdated Show resolved Hide resolved
content/en/docs/16.0/reference/vreplication/vstream.md Outdated Show resolved Hide resolved
e, err := reader.Recv()
...
```

Copy link
Contributor

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.

Copy link
Collaborator Author

@mattlord mattlord Dec 27, 2022

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]>
@mattlord
Copy link
Collaborator Author

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.

@yoheimuta
Copy link
Collaborator

And the new vstream copy resume work added in:
vitessio/vitess#11909

@mattlord Hi. As to vitessio/vitess#11909 (comment), is something missing in this request?
I was going to add the below commit.

commit
Commit: 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:

@mattlord
Copy link
Collaborator Author

And the new vstream copy resume work added in:
vitessio/vitess#11909

@mattlord Hi. As to vitessio/vitess#11909 (comment), is something missing in this request? I was going to add the below commit.

@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!

Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rohit-nayak-ps
Copy link
Contributor

@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.

@mattlord
Copy link
Collaborator Author

mattlord commented Jan 7, 2023

@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!

@mattlord mattlord merged commit 74ceb85 into prod Jan 7, 2023
@mattlord mattlord deleted the vstream_docs branch January 7, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants