-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
how to use shard function #441
Comments
Taking this, with the hope of having a quick document or write-up in a few hours. |
I've started writing a document, but it's a first draft and probably will take a couple of days to finalize. @mitiger, if you need something faster than that, I can provide you with a minimal set of commands that need to be run. You can also take a look at test/initial_sharding.py:test_resharding to see what commands are run for the end-to-end test. |
@aaijazi , I hava read initial_sharding.py , and try in my server. there is a question, when i exec command : "./vtworker -min_healthy_rdonly_endpoints=1 -cell=test SplitDiff test_keyspace/-80" vttablet logs show : can't read startPosition: error Table '_vt.blp_checkpoint' doesn't exist (errno 1146) during query: SELECT pos, flags FROM _vt.blp_checkpoint WHERE source_shard_uid=0 in selecting from recovery table SELECT pos, flags FROM _vt.blp_checkpoint WHERE source_shard_uid=0 blp_chekpoint not found , i don't know when table blp_checkpoint create ? |
@aaijazi , please give me the minimal set of commands ,so i can see if some commands lost in my demo. |
@mitiger try adding
I'll get you the minimal set of commands in a few minutes. |
@aaijazi , the command take a long time , and not success? is it normally? |
@mitiger: I haven't tested these exact commands myself, but I think they should you get going. Preparing source shard
Preparing destination shards
Cloning the data
Verify data was copied correctly (optional, but recommended)
Start serving traffic from destination shard
Scrap the source shardNote: only do these steps if all the above steps were successful.
|
@mitiger That looks like fairly normal output for the copy command. What makes you say it won't succeed? How many tables/rows were you expecting? How long did it run for? You can monitor the status of the copy by viewing the status page in your browser. It should also log/print the status every second. |
@aaijazi , in my keyspace , just one table and 200 rows . |
@aaijazi i found the table _vt.blp_checkpoint not been created . i think the reason is here . |
@mitiger: if the source shard has the You might want to try deleting the destination tablets, and then trying the sharding steps again (in case your destination tablets are in a bad state). If that doesn't succeed, please provide a link to the full logs from the failing operation, and I can try to help track down what's going wrong. |
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
I hava start vttablet and vtgate, everything is OK.
but now, need use shard function ,i create two shard that is -64,64- . but i don't know how to copy data from keyspace/0 to keyspace/-64 and keyspace/64- .
can autors give some examples with shell or or introductions about how to use shard function.
thanks a lot.
The text was updated successfully, but these errors were encountered: