We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vtgate's show vitess_tablets command does not show the timestamp for a new master.
show vitess_tablets
Run local example (101_initial_cluster.sh). Connect to vtgate.
$ mysql mysql> show vitess_tablets; +-------+----------+-------+------------+---------+------------------+------------------+----------------------+ | Cell | Keyspace | Shard | TabletType | State | Alias | Hostname | MasterTermStartTime | +-------+----------+-------+------------+---------+------------------+------------------+----------------------+ | zone1 | commerce | 0 | MASTER | SERVING | zone1-0000000100 |<hostname redacted>| 2020-06-09T18:08:09Z | | zone1 | commerce | 0 | REPLICA | SERVING | zone1-0000000101 |<hostname redacted>| | | zone1 | commerce | 0 | RDONLY | SERVING | zone1-0000000102 |<hostname redacted>| | +-------+----------+-------+------------+---------+------------------+------------------+----------------------+ 3 rows in set (0.00 sec)
From another shell, reparent to tablet 101
$ vtctlclient PlannedReparentShard -keyspace_shard=commerce/0 -new_master=zone1-0000000101 I0609 11:14:31.899712 25100 main.go:64] I0609 18:14:31.897724 reparent.go:559] Checking replication on master-elect zone1-0000000101 I0609 11:14:31.919441 25100 main.go:64] I0609 18:14:31.919056 reparent.go:594] demote current master cell:"zone1" uid:100 I0609 11:14:32.780261 25100 main.go:64] I0609 18:14:32.779588 reparent.go:692] populating reparent journal on new master zone1-0000000101 I0609 11:14:32.780739 25100 main.go:64] I0609 18:14:32.779916 reparent.go:675] setting new master on replica zone1-0000000102 I0609 11:14:32.780794 25100 main.go:64] I0609 18:14:32.779966 reparent.go:675] setting new master on replica zone1-0000000100
Now look at tablet status again
mysql> show vitess_tablets; +-------+----------+-------+------------+---------+------------------+------------------+----------------------+ | Cell | Keyspace | Shard | TabletType | State | Alias | Hostname | MasterTermStartTime | +-------+----------+-------+------------+---------+------------------+------------------+----------------------+ | zone1 | commerce | 0 | MASTER | SERVING | zone1-0000000101 |<hostname redacted>| | | zone1 | commerce | 0 | REPLICA | SERVING | zone1-0000000100 |<hostname redacted>| 2020-06-09T18:08:09Z | | zone1 | commerce | 0 | RDONLY | SERVING | zone1-0000000102 |<hostname redacted>| | +-------+----------+-------+------------+---------+------------------+------------------+----------------------+ 3 rows in set (0.00 sec)
Notice that tablet 101 is now MASTER but it's MasterTermStartTime is still empty.
$ vtgate --version Version: 945e105aa (Git branch 'master') built on Tue Jun 9 12:35:29 PDT 2020 by <redacted> using go1.13.6 linux/amd64
$ uname -a Linux <hostname redacted> 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
Desired output: Before reparenting:
mysql> show vitess_tablets; +-------+----------+-------+------------+---------+------------------+------------------+---------------------------+ | Cell | Keyspace | Shard | TabletType | State | Alias | Hostname | MasterTermStartTime | +-------+----------+-------+------------+---------+------------------+------------------+---------------------------+ | zone1 | commerce | 0 | MASTER | SERVING | zone1-0000000100 |<hostname redacted>| 2020-06-09T20:41:31Z | | zone1 | commerce | 0 | REPLICA | SERVING | zone1-0000000101 |<hostname redacted>| | | zone1 | commerce | 0 | RDONLY | SERVING | zone1-0000000102 |<hostname redacted>| | +-------+----------+-------+------------+---------+------------------+------------------+---------------------------+ 3 rows in set (0.00 sec)
After reparenting:
mysql> show vitess_tablets; +-------+----------+-------+------------+---------+------------------+------------------+---------------------------+ | Cell | Keyspace | Shard | TabletType | State | Alias | Hostname | MasterTermStartTime | +-------+----------+-------+------------+---------+------------------+------------------+---------------------------+ | zone1 | commerce | 0 | MASTER | SERVING | zone1-0000000101 |<hostname redacted>| 2020-06-09T20:43:47Z | | zone1 | commerce | 0 | REPLICA | SERVING | zone1-0000000100 |<hostname redacted>| | | zone1 | commerce | 0 | RDONLY | SERVING | zone1-0000000102 |<hostname redacted>| | +-------+----------+-------+------------+---------+------------------+------------------+---------------------------+ 3 rows in set (0.00 sec)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Overview of the Issue
vtgate's
show vitess_tablets
command does not show the timestamp for a new master.Reproduction Steps
Run local example (101_initial_cluster.sh). Connect to vtgate.
From another shell, reparent to tablet 101
Now look at tablet status again
Notice that tablet 101 is now MASTER but it's MasterTermStartTime is still empty.
Binary version
Operating system and Environment details
The text was updated successfully, but these errors were encountered: