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

region sharding example #6209

Merged
merged 2 commits into from
May 29, 2020
Merged

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented May 21, 2020

This example shows how to use a multi-column vindex + lookup vindex to shard using a location column.
The main table (customer) is sharded using a region_json vindex. The lookup table is sharded using keyspace_id so that the customer data and lookup data reside in the same shard.

Signed-off-by: deepthi deepthi@planetscale.com

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi requested a review from sougou as a code owner May 21, 2020 00:26
CELL=zone1 ./scripts/vtctld-up.sh

# start vttablets for main keyspace. we start only one tablet each (master)
CELL=zone1 TABLET_UID=100 ./scripts/mysqlctl-up.sh
Copy link
Member Author

Choose a reason for hiding this comment

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

Q: we are keeping all shards in the same cell. Will it make the example better to create multiple cells and put each shard in a different cell?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. I think it will be important to showcase multi-cell.

CELL=zone1 ./scripts/vtctld-up.sh

# start vttablets for main keyspace. we start only one tablet each (master)
CELL=zone1 TABLET_UID=100 ./scripts/mysqlctl-up.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. I think it will be important to showcase multi-cell.

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi merged commit e7c58d5 into vitessio:master May 29, 2020
@deepthi
Copy link
Member Author

deepthi commented May 29, 2020

Multi-cell will be added in a future PR.

@deepthi deepthi deleted the ds-region-sharding-demo branch July 6, 2020 19:00
@deepthi deepthi added this to the v7.0 milestone Jul 17, 2020
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.

2 participants