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

VSCopy: Copy from all shards in all keyspaces by specifying only an empty gtid #11886

Closed
yoheimuta opened this issue Dec 6, 2022 · 0 comments · Fixed by #11909
Closed

VSCopy: Copy from all shards in all keyspaces by specifying only an empty gtid #11886

yoheimuta opened this issue Dec 6, 2022 · 0 comments · Fixed by #11909
Assignees
Labels
Component: VReplication Type: Enhancement Logical improvement (somewhere between a bug and feature) Type: Feature

Comments

@yoheimuta
Copy link
Contributor

Feature Description

If either keyspace or shard is unspecified, the request with an empty gtid like the following should copy tables from all shards in all keyspaces.

vgtid := &binlogdatapb.VGtid{
         		ShardGtids: []*binlogdatapb.ShardGtid{{
         			Gtid:     "",
                }}
         }

Currently, this request fails due to INVALID_ARGUMENT at the below two checks:

  • if vgtid.ShardGtids[0].Gtid != "current" {
    return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "for an empty keyspace, the Gtid value must be 'current': %v", vgtid)
    }
  • if sgtid.Gtid != "current" {
    return nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "if shards are unspecified, the Gtid value must be 'current': %v", vgtid)
    }

Discussion

https://vitess.slack.com/archives/C0PQY0PTK/p1670315632556969

Use Case(s)

  • Copying tables across many shards and keyspaces through VTGate's VStream API
@yoheimuta yoheimuta added Needs Triage This issue needs to be correctly labelled and triaged Type: Feature labels Dec 6, 2022
@rohit-nayak-ps rohit-nayak-ps added Type: Enhancement Logical improvement (somewhere between a bug and feature) and removed Needs Triage This issue needs to be correctly labelled and triaged labels Dec 6, 2022
@mattlord mattlord added this to v17.0.0 Feb 9, 2023
@mattlord mattlord self-assigned this Feb 14, 2023
@frouioui frouioui moved this to Backlog in v17.0.0 Feb 15, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in v17.0.0 Mar 14, 2023
yoheimuta added a commit to vitessio/website that referenced this issue Mar 15, 2023
yoheimuta added a commit to vitessio/website that referenced this issue Mar 15, 2023
yoheimuta added a commit to vitessio/website that referenced this issue Mar 15, 2023
yoheimuta added a commit to vitessio/website that referenced this issue Mar 15, 2023
yoheimuta added a commit to vitessio/website that referenced this issue Mar 16, 2023
yoheimuta added a commit to vitessio/website that referenced this issue Mar 16, 2023
mattlord added a commit to vitessio/website that referenced this issue Mar 16, 2023
* Update the vstream doc in v17.0 to reflect vitessio/vitess#11886

Signed-off-by: yoheimuta <[email protected]>

* Update content/en/docs/17.0/reference/vreplication/vstream.md

Co-authored-by: Matt Lord <[email protected]>
Signed-off-by: yohei yoshimuta <[email protected]>

* Update content/en/docs/17.0/reference/vreplication/vstream.md

Co-authored-by: Matt Lord <[email protected]>
Signed-off-by: yohei yoshimuta <[email protected]>

* Update content/en/docs/17.0/reference/vreplication/vstream.md

Co-authored-by: Matt Lord <[email protected]>
Signed-off-by: yohei yoshimuta <[email protected]>

* Update content/en/docs/17.0/reference/vreplication/vstream.md

Co-authored-by: Matt Lord <[email protected]>
Signed-off-by: yohei yoshimuta <[email protected]>

* Update content/en/docs/17.0/reference/vreplication/vstream.md

Co-authored-by: Matt Lord <[email protected]>
Signed-off-by: yohei yoshimuta <[email protected]>

* Remove the unused forward slash at the end of Match value

Signed-off-by: yoheimuta <[email protected]>

* Add an empty line between the sections

Signed-off-by: yoheimuta <[email protected]>

---------

Signed-off-by: yoheimuta <[email protected]>
Signed-off-by: yohei yoshimuta <[email protected]>
Co-authored-by: Matt Lord <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: VReplication Type: Enhancement Logical improvement (somewhere between a bug and feature) Type: Feature
Projects
No open projects
Status: Done
3 participants