Skip to content

Instantly share code, notes, and snippets.

@CaptTofu
Created November 2, 2017 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CaptTofu/6d6cda325844a1f18a12aa974f44aa2a to your computer and use it in GitHub Desktop.
Save CaptTofu/6d6cda325844a1f18a12aa974f44aa2a to your computer and use it in GitHub Desktop.
+ ./kvtctl.sh InitShardMaster -force main/-80 zone1-1504789100
Starting port forwarding to vtctld...
E1102 05:36:48.444678 17995 main.go:61] Remote error: rpc error: code = Unknown desc = node doesn't exist
+ ./kvtctl.sh InitShardMaster -force main/80- zone1-1015307700
Starting port forwarding to vtctld...
E1102 05:36:49.643641 18836 main.go:61] Remote error: rpc error: code = Unknown desc = node doesn't exist
++ cat schema.sql
+ ./kvtctl.sh ApplySchema -sql 'CREATE TABLE messages (
page BIGINT(20) UNSIGNED,
time_created_ns BIGINT(20) UNSIGNED,
message VARCHAR(10000),
PRIMARY KEY (page, time_created_ns)
) ENGINE=InnoDB' main
Starting port forwarding to vtctld...
E1102 05:36:50.836882 19670 main.go:61] Remote error: rpc error: code = Unknown desc = keyspace: main does not contain any master tablets
++ cat vschema.json
+ ./kvtctl.sh ApplyVSchema -vschema '{
"sharded": true,
"vindexes": {
"hash": {
"type": "hash"
}
},
"tables": {
"messages": {
"column_vindexes": [
{
"column": "page",
"name": "hash"
}
]
}
}
}' main
Starting port forwarding to vtctld...
Uploaded VSchema object:
{
"sharded": true,
"vindexes": {
"hash": {
"type": "hash"
}
},
"tables": {
"messages": {
"column_vindexes": [
{
"column": "page",
"name": "hash"
}
]
}
}
}
If this is not what you expected, check the input data (as JSON parsing will skip unexpected fields).
+ ./kvtctl.sh Backup zone1-1504789101
Starting port forwarding to vtctld...
E1102 05:36:54.093222 21343 main.go:61] Remote error: rpc error: code = Unknown desc = node doesn't exist
+ ./kvtctl.sh Backup zone1-101530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment