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.
Used in:
, , , ,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
Used in:
, , ,Cells that map to this alias
ExternalClusters
Used in:
KeyRange describes a range of sharding keys, when range-based sharding is used.
Used in:
, , , , , , ,A Keyspace contains data about a keyspace.
Used in:
, ,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
DurabilityPolicy is the durability policy to be used for the keyspace.
ThrottlerConfig has the configuration for the tablet server's lag throttler, and applies to the entire keyspace, across all shards and tablets.
SidecarDBName is the name of the Vitess sidecar database used for various system metadata that is stored in each tablet's mysqld instance.
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.
Used in:
, , , ,primary_alias is the tablet alias of the primary for the shard. If it is unset, then there is no primary 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 (InitShardPrimary, PlannedReparentShard,EmergencyReparentShard), to guarantee exclusive operation.
primary_term_start_time is the time (in UTC) at which the current term of the primary specified in primary_alias began. A new primary term begins any time an authoritative decision is communicated about which tablet should be the primary, such as via Vitess replication-management commands like PlannedReparentShard, EmergencyReparentShard, and TabletExternallyReparented. The primary_alias should only ever be changed if the new primary's term began at a later time than this. Note that a new term can start for the tablet that is already the primary. In that case, the primary_term_start_time would be increased without changing the primary_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.
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_primary_serving sets whether this shard primary is serving traffic or not. The keyspace lock is always taken when changing this.
SourceShard represents a data source for filtered replication across shards. When this is used in a destination shard, the primary 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 primary. 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.
Used in:
Note there can be only one Node in this array for a given tablet.
Node describes a tablet instance within the cell
Used in:
ShardReplicationError describes the error being fixed by ShardReplicationFix.
Used in:
Type is the category of problem being fixed.
TabletAlias is the tablet record that has the problem.
Used in:
UNKNOWN is not a valid value.
NOT_FOUND occurs when a tablet is in the ShardReplication record but does not exist in the topology.
TOPOLOGY_MISMATCH occurs when a tablet is in the replication graph and exists in the topology, but at least one of the Keyspace, Shard, or Cell fields for that tablet does not match the ShardReplication record.
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.
Used in:
The partitions this keyspace is serving, per tablet type.
ThrottlerConfig has the configuration for the tablet server's lag throttler, and applies to the entire keyspace, across all shards and tablets. This is copied from the global keyspace object.
Used in:
The type this partition applies to.
List of non-overlapping continuous shards sorted by range.
List of shard tablet controls
Tablet represents information about a running instance of vttablet.
Used in:
, , , ,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.
primary_term_start_time is the time (in UTC) at which the current term of the current tablet began as primary. If this tablet is not currently the primary, this value is ignored. A new primary term begins any time an authoritative decision is communicated about which tablet should be the primary, such as via Vitess replication-management commands like PlannedReparentShard, EmergencyReparentShard, and TabletExternallyReparented.
default_conn_collation is the default connection collation used by this tablet.
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.
PRIMARY is the primary server for the shard. Only PRIMARY allows DMLs.
DEPRECATED
REPLICA replicates from primary. It is used to serve live traffic. A REPLICA can be promoted to PRIMARY. A demoted PRIMARY 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.
ThrottledAppRule defines an app-specific throttling rule, with expiration.
Used in:
, ,Name of the app to be throttled, e.g. "vreplication" or "online-ddl"
Ratio defines how much the app should be throttled, range [0.0...1.0]. 1.0 means fully throttled. 0.0 means not throttled at all. Negative values are reserved for a future implementation.
ExpiresAt is the time at which the rule expires.
Exempt indicates the app should never be throttled, even if the throttler is, in general, throttling other apps.
Used in:
,Enabled indicates that the throttler is actually checking state for requests. When disabled, it automatically returns 200 OK for all checks.
Threshold is the threshold for either the default check (heartbeat lag) or custom check.
CustomQuery is an optional query that overrides the default check query.
CheckAsCheckSelf indicates whether a throttler /check request should behave like a /check-self.
ThrottledApps is a map of rules for app-specific throttling
AppCheckedMetrics maps app names to the list of metrics that should be checked for that app
MetricThresholds maps metric names to the threshold values that should be used for that metric
Used in:
Used in: