зеркало из https://github.com/github/vitess-gh.git
03a9b0e274
* feat: fix 101_initiail_cluster to not run PRS, but instead wait for tablets to be up and primary promotion by vtorc Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: fix remaining binaries in local examples to not call ISP at all and instead rely on VTOrc to elect a primary Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: fix region-sharding example too to not call ISP Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: use _ instead of i in for loop since i is unused Signed-off-by: Manan Gupta <manan@planetscale.com> Signed-off-by: Manan Gupta <manan@planetscale.com> |
||
---|---|---|
.. | ||
scripts | ||
vtadmin | ||
vtorc | ||
101_initial_cluster.sh | ||
201_main_sharded.sh | ||
202_new_tablets.sh | ||
203_reshard.sh | ||
204_switch_reads.sh | ||
205_switch_writes.sh | ||
206_down_shard_0.sh | ||
207_delete_shard_0.sh | ||
301_teardown.sh | ||
README.md | ||
countries.json | ||
create_lookup_schema.sql | ||
create_main_schema.sql | ||
env.sh | ||
insert_customers.sql | ||
lookup_vindex.json | ||
main_vschema_initial.json | ||
main_vschema_sharded.json | ||
show_data.sql | ||
show_initial_data.sql | ||
topo-etcd2.sh | ||
topo-k8s.sh | ||
topo-zk2.sh |
README.md
Instructions
Detailed instructions for running this example can be found at https://vitess.io. This document contains the summary of the commands to be run.
# Edit main_vschema_sharded.json and set region_map to full path of countries.json file
# Example:
"region_map": "/home/user/vitess/examples/region_sharding/countries.json",
# setup environment and aliases
source env.sh
# Bring up initial cluster and main keyspace (unsharded)
./101_initial_cluster.sh
# Insert and verify data
mysql < insert_customers.sql
mysql --table < show_initial_data.sql
# create schema and vschema for sharding (+lookup vindex)
./201_main_sharded.sh
# bring up shards and tablets
./202_new_tablets.sh
# reshard
./203_reshard.sh
# SwitchReads
./204_switch_reads.sh
# run script to create traffic before switching writes
#./client.sh
# SwitchWrites
./205_switch_writes.sh
# show no / minimal write errors during switch
# verify sharded data
mysql --table < show_data.sql
# down shard
./206_down_shard_0.sh
# delete shard 0
./207_delete_shard_0.sh
# Down cluster
./301_teardown.sh