Get desktop application:
View/edit binary Protocol Buffers messages
CellInfo contains information about a cell. CellInfo objects are stored in the global topology server, and describe how to reach local topology servers.
ServerAddress contains the address of the server for the cell. The syntax of this field is topology implementation specific. For instance, for Zookeeper, it is a comma-separated list of server addresses.
Root is the path to store data in. It is only used when talking to server_address.
CellsAlias
Cells that map to this alias
KeyRange describes a range of sharding keys, when range-based sharding is used.
Used in: , , , , , ,
A Keyspace contains data about a keyspace.
name of the column used for sharding empty if the keyspace is not sharded
type of the column used for sharding UNSET if the keyspace is not sharded
ServedFrom will redirect the appropriate traffic to another keyspace.
keyspace_type will determine how this keyspace is treated by vtgate / vschema. Normal keyspaces are routable by any query. Snapshot keyspaces are only accessible by explicit addresssing or by calling "use keyspace" first
base_keyspace is the base keyspace from which a snapshot keyspace is created. empty for normal keyspaces
snapshot_time (in UTC) is a property of snapshot keyspaces which tells us what point in time the snapshot is of
ServedFrom indicates a relationship between a TabletType and the keyspace name that's serving it.
Used in:
the tablet type (key for the map)
the cells to limit this to
the keyspace name that's serving it
KeyspaceIdType describes the type of the sharding key for a range-based sharded keyspace.
Used in: ,
UNSET is the default value, when range-based sharding is not used.
UINT64 is when uint64 value is used. This is represented as 'unsigned bigint' in mysql
BYTES is when an array of bytes is used. This is represented as 'varbinary' in mysql
KeyspaceType describes the type of the keyspace
Used in:
NORMAL is the default value
SNAPSHOT is when we are creating a snapshot keyspace
A Shard contains data about a subset of the data whithin a keyspace.
master_alias is the tablet alias of the master for the shard. If it is unset, then there is no master in this shard yet. No lock is necessary to update this field, when for instance TabletExternallyReparented updates this. However, we lock the shard for reparenting operations (InitShardMaster, PlannedReparentShard,EmergencyReparentShard), to guarantee exclusive operation.
master_term_start_time is the time (in UTC) at which the current term of the master specified in master_alias began. A new master term begins any time an authoritative decision is communicated about which tablet should be the master, such as via Vitess replication-management commands like PlannedReparentShard, EmergencyReparentShard, and TabletExternallyReparented. The master_alias should only ever be changed if the new master's term began at a later time than this. Note that a new term can start for the tablet that is already the master. In that case, the master_term_start_time would be increased without changing the master_alias.
key_range is the KeyRange for this shard. It can be unset if: - we are not using range-based sharding in this shard. - the shard covers the entire keyrange. This must match the shard name based on our other conventions, but helpful to have it decomposed here. Once set at creation time, it is never changed.
served_types has at most one entry per TabletType This field is in the process of being deprecated in favor of is_master_serving. Keeping for backwards compatibility purposes.
SourceShards is the list of shards we're replicating from, using filtered replication. The keyspace lock is always taken when changing this.
tablet_controls has at most one entry per TabletType. The keyspace lock is always taken when changing this.
is_master_serving sets whether this shard master is serving traffic or not. The keyspace lock is always taken when changing this.
ServedType is an entry in the served_types
Used in:
SourceShard represents a data source for filtered replication across shards. When this is used in a destination shard, the master of that shard will run filtered replication.
Used in:
Uid is the unique ID for this SourceShard object.
the source keyspace
the source shard
the source shard keyrange
the source table list to replicate
TabletControl controls tablet's behavior
Used in:
which tablet type is affected
frozen is set if we've started failing over traffic for the master. If set, this record should not be removed.
ShardReference is used as a pointer from a SrvKeyspace to a Shard
Used in:
Copied from Shard.
Disable query serving in this shard
ShardReplication describes the MySQL replication relationships whithin a cell.
Note there can be only one Node in this array for a given tablet.
Node describes a tablet instance within the cell
Used in:
ShardTabletControl is used as a pointer from a SrvKeyspace to a Shard
Used in:
Copied from Shard.
Disable query serving in this shard
SrvKeyspace is a rollup node for the keyspace itself.
The partitions this keyspace is serving, per tablet type.
copied from Keyspace
Used in:
The type this partition applies to.
List of non-overlapping continuous shards sorted by range.
List of shard tablet controls
ServedFrom indicates a relationship between a TabletType and the keyspace name that's serving it.
Used in:
the tablet type
the keyspace name that's serving it
Tablet represents information about a running instance of vttablet.
alias is the unique name of the tablet.
Fully qualified domain name of the host.
Map of named ports. Normally this should include vt and grpc. Going forward, the mysql port will be stored in mysql_port instead of here. For accessing mysql port, use topoproto.MysqlPort to fetch, and topoproto.SetMysqlPort to set. These wrappers will ensure legacy behavior is supported.
Keyspace name.
Shard name. If range based sharding is used, it should match key_range.
If range based sharding is used, range for the tablet's shard.
type is the current type of the tablet.
It this is set, it is used as the database name instead of the normal "vt_" + keyspace.
tablet tags
MySQL hostname.
MySQL port. Use topoproto.MysqlPort and topoproto.SetMysqlPort to access this variable. The functions provide support for legacy behavior.
master_term_start_time is the time (in UTC) at which the current term of the current tablet began as master. If this tablet is not currently the master, this value is ignored. A new master term begins any time an authoritative decision is communicated about which tablet should be the master, such as via Vitess replication-management commands like PlannedReparentShard, EmergencyReparentShard, and TabletExternallyReparented.
TabletAlias is a globally unique tablet identifier.
Used in: , , , , , , , , , , , , , , ,
cell is the cell (or datacenter) the tablet is in
uid is a unique id for this tablet within the shard (this is the MySQL server id as well).
TabletType represents the type of a given tablet.
Used in: , , , , , , , , , , , ,
UNKNOWN is not a valid value.
MASTER is the master server for the shard. Only MASTER allows DMLs.
REPLICA replicates from master. It is used to serve live traffic. A REPLICA can be promoted to MASTER. A demoted MASTER will go to REPLICA.
RDONLY (old name) / BATCH (new name) is used to serve traffic for long-running jobs. It is a separate type from REPLICA so long-running queries don't affect web-like traffic.
SPARE is a type of servers that cannot serve queries, but is available in case an extra server is needed.
EXPERIMENTAL is like SPARE, except it can serve queries. This type can be used for usages not planned by Vitess, like online export to another storage engine.
BACKUP is the type a server goes to when taking a backup. No queries can be served in BACKUP mode.
RESTORE is the type a server uses when restoring a backup, at startup time. No queries can be served in RESTORE mode.
DRAINED is the type a server goes into when used by Vitess tools to perform an offline action. It is a serving type (as the tools processes may need to run queries), but it's not used to route queries from Vitess users. In this state, this tablet is dedicated to the process that uses it.