/* Copyright 2020 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This package contains the types used by VTAdmin (and later an RPC service). syntax = "proto3"; option go_package = "vitess.io/vitess/go/vt/proto/vtadmin"; package vtadmin; import "logutil.proto"; import "mysqlctl.proto"; import "tabletmanagerdata.proto"; import "topodata.proto"; import "vschema.proto"; import "vtctldata.proto"; /* Services */ // VTAdmin is the Vitess Admin API service. It provides RPCs that operate on // across a range of Vitess clusters. service VTAdmin { // CreateKeyspace creates a new keyspace in the given cluster. rpc CreateKeyspace(CreateKeyspaceRequest) returns (CreateKeyspaceResponse) {}; // CreateShard creates a new shard in the given cluster and keyspace. rpc CreateShard(CreateShardRequest) returns (vtctldata.CreateShardResponse) {}; // DeleteKeyspace deletes a keyspace in the given cluster. rpc DeleteKeyspace(DeleteKeyspaceRequest) returns (vtctldata.DeleteKeyspaceResponse) {}; // DeleteShard deletes one or more shards in the given cluster and keyspace. rpc DeleteShards(DeleteShardsRequest) returns (vtctldata.DeleteShardsResponse) {}; // DeleteTablet deletes a tablet from the topology rpc DeleteTablet(DeleteTabletRequest) returns (DeleteTabletResponse) {}; // EmergencyFailoverShard fails over a shard to a new primary. It assumes // the old primary is dead or otherwise not responding. rpc EmergencyFailoverShard(EmergencyFailoverShardRequest) returns (EmergencyFailoverShardResponse) {}; // FindSchema returns a single Schema that matches the provided table name // across all specified clusters IDs. Not specifying a set of cluster IDs // causes the search to span all configured clusters. // // An error occurs if either no table exists across any of the clusters with // the specified table name, or if multiple tables exist with that name. rpc FindSchema(FindSchemaRequest) returns (Schema) {}; // GetBackups returns backups grouped by cluster. rpc GetBackups(GetBackupsRequest) returns (GetBackupsResponse) {}; // GetCellInfos returns the CellInfo objects for the specified clusters. // // Callers may optionally restrict the set of CellInfos, or restrict the // response to include only cell names. rpc GetCellInfos(GetCellInfosRequest) returns (GetCellInfosResponse) {}; // GetCellsAliases returns the CellsAliases data for the specified clusters. rpc GetCellsAliases(GetCellsAliasesRequest) returns (GetCellsAliasesResponse) {}; // GetClusters returns all configured clusters. rpc GetClusters(GetClustersRequest) returns (GetClustersResponse) {}; // GetFullStatus returns the full status of MySQL including the replication information, semi-sync information, GTID information among others rpc GetFullStatus(GetFullStatusRequest) returns (vtctldata.GetFullStatusResponse) {}; // GetGates returns all gates across all the specified clusters. rpc GetGates(GetGatesRequest) returns (GetGatesResponse) {}; // GetKeyspace returns a keyspace by name in the specified cluster. rpc GetKeyspace(GetKeyspaceRequest) returns (Keyspace) {}; // GetKeyspaces returns all keyspaces across the specified clusters. rpc GetKeyspaces(GetKeyspacesRequest) returns (GetKeyspacesResponse) {}; // GetSchema returns the schema for the specified (cluster, keyspace, table) // tuple. rpc GetSchema(GetSchemaRequest) returns (Schema) {}; // GetSchemas returns all schemas across the specified clusters. rpc GetSchemas(GetSchemasRequest) returns (GetSchemasResponse) {}; // GetShardReplicationPositions returns shard replication positions grouped // by cluster. rpc GetShardReplicationPositions(GetShardReplicationPositionsRequest) returns (GetShardReplicationPositionsResponse) {}; // GetSrvKeyspace returns the SrvKeyspace for a keyspace in one or more cells. rpc GetSrvKeyspace (GetSrvKeyspaceRequest) returns (vtctldata.GetSrvKeyspacesResponse) {}; // GetSrvKeyspaces returns the SrvKeyspaces for all keyspaces across all the specified clusters. rpc GetSrvKeyspaces (GetSrvKeyspacesRequest) returns (GetSrvKeyspacesResponse) {}; // GetSrvVSchema returns the SrvVSchema for the given cluster and cell. rpc GetSrvVSchema (GetSrvVSchemaRequest) returns (SrvVSchema) {}; // GetSrvVSchemas returns all SrvVSchemas across all (or specified) clusters // and cells. rpc GetSrvVSchemas(GetSrvVSchemasRequest) returns (GetSrvVSchemasResponse) {}; // GetTablet looks up a tablet by hostname across all clusters and returns // the result. rpc GetTablet(GetTabletRequest) returns (Tablet) {}; // GetTablets returns all tablets across all the specified clusters. rpc GetTablets(GetTabletsRequest) returns (GetTabletsResponse) {}; // GetTopologyPath returns the cell located at the specified path in the topology server. rpc GetTopologyPath(GetTopologyPathRequest) returns (vtctldata.GetTopologyPathResponse){}; // GetVSchema returns a VSchema for the specified keyspace in the specified // cluster. rpc GetVSchema(GetVSchemaRequest) returns (VSchema) {}; // GetVSchemas returns the VSchemas for all specified clusters. rpc GetVSchemas(GetVSchemasRequest) returns (GetVSchemasResponse) {}; // GetVtctlds returns the Vtctlds for all specified clusters. rpc GetVtctlds(GetVtctldsRequest) returns (GetVtctldsResponse) {}; // GetWorkflow returns a single Workflow for a given cluster, keyspace, and // workflow name. rpc GetWorkflow(GetWorkflowRequest) returns (Workflow) {}; // GetWorkflows returns the Workflows for all specified clusters. rpc GetWorkflows(GetWorkflowsRequest) returns (GetWorkflowsResponse) {}; // PingTablet checks that the specified tablet is awake and responding to // RPCs. This command can be blocked by other in-flight operations. rpc PingTablet(PingTabletRequest) returns (PingTabletResponse) {}; // PlannedFailoverShard fails over the shard to a new primary, or away from // an old primary. Both the old and new primaries must be reachable and // running. // // NOTE: A planned failover will not consider replicas outside the current // shard primary's cell as promotion candidates unless NewPrimary is // explicitly provided in the request. rpc PlannedFailoverShard(PlannedFailoverShardRequest) returns (PlannedFailoverShardResponse) {}; // RebuildKeyspaceGraph rebuilds the serving data for a keyspace. rpc RebuildKeyspaceGraph(RebuildKeyspaceGraphRequest) returns (RebuildKeyspaceGraphResponse) {}; // RefreshState reloads the tablet record on the specified tablet. rpc RefreshState(RefreshStateRequest) returns (RefreshStateResponse) {}; // RefreshTabletReplicationSource performs a `CHANGE REPLICATION SOURCE TO` // on a tablet to replicate from the current primary in the shard. rpc RefreshTabletReplicationSource(RefreshTabletReplicationSourceRequest) returns (RefreshTabletReplicationSourceResponse) {}; // ReloadSchemas reloads the schema definition across keyspaces, shards, or // tablets in one or more clusters, depending on the request fields (see // ReloadSchemasRequest for details). rpc ReloadSchemas(ReloadSchemasRequest) returns (ReloadSchemasResponse) {}; // ReloadSchemaShard reloads the schema on all tablets in a shard. This is done on a best-effort basis. rpc ReloadSchemaShard(ReloadSchemaShardRequest) returns (ReloadSchemaShardResponse) {}; // RemoveKeyspaceCell removes the cell from the Cells list for all shards in the keyspace, and the SrvKeyspace for that keyspace in that cell. rpc RemoveKeyspaceCell(RemoveKeyspaceCellRequest) returns (RemoveKeyspaceCellResponse) {}; // RunHealthCheck runs a healthcheck on the tablet. rpc RunHealthCheck(RunHealthCheckRequest) returns (RunHealthCheckResponse) {}; // SetReadOnly sets the tablet to read-only mode. rpc SetReadOnly(SetReadOnlyRequest) returns (SetReadOnlyResponse) {}; // SetReadWrite sets the tablet to read-write mode. rpc SetReadWrite(SetReadWriteRequest) returns (SetReadWriteResponse) {}; // StartReplication runs the underlying database command to start // replication on a tablet. rpc StartReplication(StartReplicationRequest) returns (StartReplicationResponse) {}; // StopReplication runs the underlying database command to stop replication // on a tablet rpc StopReplication(StopReplicationRequest) returns (StopReplicationResponse) {}; // TabletExternallyPromoted updates the metadata in a cluster's topology // to acknowledge a shard primary change performed by an external tool // (e.g. orchestrator*). // // See the Reparenting guide for more information: // https://vitess.io/docs/user-guides/configuration-advanced/reparenting/#external-reparenting. // // * "orchestrator" here refers to external orchestrator, not the newer, // Vitess-aware orchestrator, VTOrc. rpc TabletExternallyPromoted(TabletExternallyPromotedRequest) returns (TabletExternallyPromotedResponse) {}; // Validate validates all nodes in a cluster that are reachable from the global replication graph, // as well as all tablets in discoverable cells, are consistent rpc Validate(ValidateRequest) returns (vtctldata.ValidateResponse) {}; // ValidateKeyspace validates that all nodes reachable from the specified // keyspace are consistent. rpc ValidateKeyspace(ValidateKeyspaceRequest) returns (vtctldata.ValidateKeyspaceResponse) {}; // ValidateSchemaKeyspace validates that the schema on the primary tablet // for shard 0 matches the schema on all of the other tablets in the // keyspace. rpc ValidateSchemaKeyspace(ValidateSchemaKeyspaceRequest) returns (vtctldata.ValidateSchemaKeyspaceResponse) {}; // ValidateShard validates that that all nodes reachable from the specified shard are consistent. rpc ValidateShard(ValidateShardRequest) returns (vtctldata.ValidateShardResponse) {}; // ValidateVersionKeyspace validates that the version on the primary of // shard 0 matches all of the other tablets in the keyspace. rpc ValidateVersionKeyspace(ValidateVersionKeyspaceRequest) returns (vtctldata.ValidateVersionKeyspaceResponse) {}; // ValidateVersionShard validates that the version on the primary matches all of the replicas. rpc ValidateVersionShard(ValidateVersionShardRequest) returns (vtctldata.ValidateVersionShardResponse) {}; // VTExplain provides information on how Vitess plans to execute a // particular query. rpc VTExplain(VTExplainRequest) returns (VTExplainResponse) {}; } /* Data types */ // Cluster represents information about a Vitess cluster. message Cluster { string id = 1; string name = 2; } message ClusterBackup { Cluster cluster = 1; mysqlctl.BackupInfo backup = 2; } message ClusterCellsAliases { Cluster cluster = 1; map aliases = 2; } message ClusterCellInfo { Cluster cluster = 1; string name = 2; // CellInfo contains the data for the cell. // // It may be nil if the GetCellsInfosRequest specified NamesOnly. topodata.CellInfo cell_info = 3; } message ClusterShardReplicationPosition { Cluster cluster = 1; string keyspace = 2; string shard = 3; vtctldata.ShardReplicationPositionsResponse position_info = 4; } message ClusterWorkflows { repeated Workflow workflows = 1; // Warnings is a list of non-fatal errors encountered when fetching // workflows for a particular cluster. repeated string warnings = 2; } // Keyspace represents information about a keyspace in a particular Vitess // cluster. message Keyspace { Cluster cluster = 1; vtctldata.Keyspace keyspace = 2; map shards = 3; } message Schema { Cluster cluster = 1; string keyspace = 2; repeated tabletmanagerdata.TableDefinition table_definitions = 3; // TableSizes is a mapping of table name to TableSize information. map table_sizes = 4; message ShardTableSize { uint64 row_count = 1; uint64 data_length = 2; } // TableSize aggregates table size information across all shards containing // in the given keyspace and cluster, as well as per-shard size information. message TableSize { uint64 row_count = 1; uint64 data_length = 2; map by_shard = 3; } } // Shard groups the vtctldata information about a shard record together with // the Vitess cluster it belongs to. message Shard { Cluster cluster = 1; vtctldata.Shard shard = 2; } message SrvVSchema { string cell = 1; Cluster cluster = 2; vschema.SrvVSchema srv_v_schema = 3; } // Tablet groups the topo information of a tablet together with the Vitess // cluster it belongs to. message Tablet { Cluster cluster = 1; topodata.Tablet tablet = 2; enum ServingState { UNKNOWN = 0; SERVING = 1; NOT_SERVING = 2; } ServingState state = 3; string FQDN = 4; } // VSchema represents the vschema for a keyspace in the cluster it belongs to. message VSchema { Cluster cluster = 1; // Name is the name of the keyspace this VSchema is for. string name = 2; vschema.Keyspace v_schema = 3; } // Vtctld represents information about a single Vtctld host. message Vtctld { string hostname = 1; Cluster cluster = 2; string FQDN = 3; } // VTGate represents information about a single VTGate host. message VTGate { // Hostname is the shortname of the VTGate. string hostname = 1; // Pool is group the VTGate serves queries for. Some deployments segment // VTGates into groups or pools, based on the workloads they serve queries // for. Use of this field is optional. string pool = 2; // Cell is the topology cell the VTGate is in. string cell = 3; // Cluster is the cluster the VTGate serves. Cluster cluster = 4; // Keyspaces is the list of keyspaces-to-watch for the VTGate. repeated string keyspaces = 5; string FQDN = 6; } message Workflow { Cluster cluster = 1; string keyspace = 2; vtctldata.Workflow workflow = 3; } /* Request/Response types */ message CreateKeyspaceRequest { string cluster_id = 1; vtctldata.CreateKeyspaceRequest options = 2; } message CreateKeyspaceResponse { Keyspace keyspace = 1; } message CreateShardRequest { string cluster_id = 1; vtctldata.CreateShardRequest options = 2; } message DeleteKeyspaceRequest { string cluster_id = 1; vtctldata.DeleteKeyspaceRequest options = 2; } message DeleteShardsRequest { string cluster_id = 1; vtctldata.DeleteShardsRequest options = 2; } message DeleteTabletRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; bool allow_primary = 3; } message DeleteTabletResponse { string status = 1; Cluster cluster = 2; } message EmergencyFailoverShardRequest { string cluster_id = 1; vtctldata.EmergencyReparentShardRequest options = 2; } message EmergencyFailoverShardResponse { Cluster cluster = 1; string keyspace = 2; string shard = 3; // PromotedPrimary is the tablet alias that was promoted to shard primary. // If NewPrimary was set in the request options, then this will be the // same tablet alias. Otherwise, it will be the alias of the tablet found // to be most up-to-date in the shard. topodata.TabletAlias promoted_primary = 4; repeated logutil.Event events = 5; } message FindSchemaRequest { string table = 1; repeated string cluster_ids = 2; GetSchemaTableSizeOptions table_size_options = 3; } message GetBackupsRequest { repeated string cluster_ids = 1; // Keyspaces, if set, limits backups to just the specified keyspaces. // Applies to all clusters in the request. repeated string keyspaces = 2; // KeyspaceShards, if set, limits backups to just the specified // keyspace/shards. Applies to all clusters in the request. // // This field takes precedence over Keyspaces. If KeyspaceShards is set, // Keyspaces is ignored. repeated string keyspace_shards = 3; // RequestOptions controls the per-shard request options when making // GetBackups requests to vtctlds. Note that the Keyspace and Shard fields // of this field are ignored; it is used only to specify Limit and Detailed // fields. vtctldata.GetBackupsRequest request_options = 4; } message GetBackupsResponse { repeated ClusterBackup backups = 1; } message GetCellInfosRequest { repeated string cluster_ids = 1; // Cells, if specified, limits the response to include only CellInfo objects // with those names. If omitted, all CellInfo objects in each cluster are // returned. // // Mutually-exclusive with NamesOnly. If both are set, this field takes // precedence. repeated string cells = 2; // Return only the cell names in each cluster; the actual CellInfo objects // will be empty. bool names_only = 3; } message GetCellInfosResponse { repeated ClusterCellInfo cell_infos = 1; } message GetCellsAliasesRequest { repeated string cluster_ids = 1; } message GetCellsAliasesResponse { repeated ClusterCellsAliases aliases = 1; } message GetClustersRequest {} message GetClustersResponse { repeated Cluster clusters = 1; } message GetFullStatusRequest { string cluster_id = 1; topodata.TabletAlias alias = 2; } message GetGatesRequest { repeated string cluster_ids = 1; } message GetGatesResponse { repeated VTGate gates = 1; } message GetKeyspaceRequest { string cluster_id = 1; string keyspace = 2; } message GetKeyspacesRequest { repeated string cluster_ids = 1; } message GetKeyspacesResponse { repeated Keyspace keyspaces = 1; } message GetSchemaRequest { string cluster_id = 1; string keyspace = 2; string table = 3; GetSchemaTableSizeOptions table_size_options = 4; } message GetSchemasRequest { repeated string cluster_ids = 1; GetSchemaTableSizeOptions table_size_options = 2; } message GetSchemasResponse { repeated Schema schemas = 1; } message GetShardReplicationPositionsRequest { repeated string cluster_ids = 1; // Keyspaces, if set, limits replication positions to just the specified // keyspaces. Applies to all clusters in the request. repeated string keyspaces = 2; // KeyspaceShards, if set, limits replicatin positions to just the specified // keyspace/shards. Applies to all clusters in the request. // // This field takes precedence over Keyspaces. If KeyspaceShards is set, // Keyspaces is ignored. repeated string keyspace_shards = 3; } message GetShardReplicationPositionsResponse { repeated ClusterShardReplicationPosition replication_positions = 1; } message GetSrvKeyspaceRequest { string cluster_id = 1; string keyspace = 2; // Cells is a list of cells to lookup a SrvKeyspace for. Leaving this empty is // equivalent to specifying all cells in the topo. repeated string cells = 3; } message GetSrvKeyspacesRequest { // An optional list of cluster IDs to filter specific clusters repeated string cluster_ids = 1; // Cells is a list of cells to lookup a SrvKeyspace for. Leaving this empty is // equivalent to specifying all cells in the topo. repeated string cells = 2; } message GetSrvKeyspacesResponse { // GetSrvKeyspaces responses for each keyspace map srv_keyspaces = 1; } message GetSrvVSchemaRequest { string cluster_id = 1; string cell = 2; } message GetSrvVSchemasRequest { repeated string cluster_ids = 1; repeated string cells = 2; } message GetSrvVSchemasResponse { repeated SrvVSchema srv_v_schemas = 1; } message GetSchemaTableSizeOptions { bool aggregate_sizes = 1; bool include_non_serving_shards = 2; } message GetTabletRequest { // Unique (per cluster) tablet alias. topodata.TabletAlias alias = 1; // ClusterIDs is an optional parameter to narrow the scope of the search, if // the caller knows which cluster the tablet may be in, or, to disambiguate // if multiple clusters have a tablet with the same hostname. repeated string cluster_ids = 2; } message GetTabletsRequest { repeated string cluster_ids = 1; } message GetTabletsResponse { repeated Tablet tablets = 1; } message GetTopologyPathRequest { string cluster_id = 1; string path = 2; } message GetVSchemaRequest { string cluster_id = 1; string keyspace = 2; } message GetVSchemasRequest { repeated string cluster_ids = 1; } message GetVSchemasResponse { repeated VSchema v_schemas = 1; } message GetVtctldsRequest { repeated string cluster_ids = 1; } message GetVtctldsResponse { repeated Vtctld vtctlds = 1; } message GetWorkflowRequest { string cluster_id = 1; string keyspace = 2; string name = 3; bool active_only = 4; } message GetWorkflowsRequest { repeated string cluster_ids = 1; // ActiveOnly specifies whether to return workflows that are currently // active (running or paused) instead of all workflows. bool active_only = 2; // Keyspaces is a list of keyspaces to restrict the workflow search to. Note // that the keyspaces list applies across all cluster IDs in the request. // // If, for example, you have two clusters, each with a keyspace called "foo" // and want the workflows from "foo" in cluster1 but not from cluster2, you // must make two requests. // // Keyspaces and IgnoreKeyspaces are mutually-exclusive, and Keyspaces takes // precedence; if Keyspaces is a non-empty list, then IgnoreKeyspaces is // ignored completely. repeated string keyspaces = 3; // IgnoreKeyspaces is a list of keyspaces to skip during the workflow // search. It has the same semantics as the Keyspaces parameter, so refer to // that documentation for more details. repeated string ignore_keyspaces = 4; } message GetWorkflowsResponse { map workflows_by_cluster = 1; } message PingTabletRequest { // Unique (per cluster) tablet alias of the standard form: "$cell-$uid" topodata.TabletAlias alias = 1; // ClusterIDs is an optional parameter to narrow the scope of the search, if // the caller knows which cluster the tablet may be in, or, to disambiguate // if multiple clusters have a tablet with the same hostname. repeated string cluster_ids = 2; } message PingTabletResponse { string status = 1; Cluster cluster = 2; } message PlannedFailoverShardRequest { string cluster_id = 1; vtctldata.PlannedReparentShardRequest options = 2; } message PlannedFailoverShardResponse { Cluster cluster = 1; string keyspace = 2; string shard = 3; // PromotedPrimary is the tablet alias that was promoted to shard primary. // If NewPrimary was set in the request options, then this will be the // same tablet alias. Otherwise, it will be the alias of the tablet found // to be most up-to-date in the shard. topodata.TabletAlias promoted_primary = 4; repeated logutil.Event events = 5; } message RebuildKeyspaceGraphRequest { string cluster_id = 1; string keyspace = 2; repeated string cells = 3; bool allow_partial = 4; } message RebuildKeyspaceGraphResponse { string status = 1; } message RefreshStateRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message RefreshStateResponse { string status = 1; Cluster cluster = 2; } message ReloadSchemasRequest { // Keyspaces, if set, will reload schemas across one or more keyspaces. A // keyspace not existing in a cluster will not fail the overall request. // // Superceded by KeyspaceShards and Tablets, in that order. repeated string keyspaces = 1; // KeyspaceShards, if set, will reload schemas across one or more shards. // Each element must be a valid keyspace/shard according to // topoproto.ParseKeyspaceShard. A shard not existing in a cluster will not // fail the overall request. // // Supercedes Keyspaces, and is superceded by Tablets. repeated string keyspace_shards = 2; // Tablets, if set will reload schemas across one or more tablets. // Supercedes both Keyspaces and KeyspaceShards. repeated topodata.TabletAlias tablets = 3; // ClusterIds optionally restricts the reload operation to clusters with // the specified IDs. An empty list of ClusterIds will operate on all // clusters. repeated string cluster_ids = 4; // Concurrency controls the number of tablets to reload at any given time. // Its semantics depend on whether the request is for keyspace, shard, or // tablet mode. // // In Keyspaces mode, Concurrency is the number of tablets to reload at once // *per keyspace*. // // In KeyspaceShards mode, Concurrency is the number of tablets to reload at // once *per shard*. // // In Tablets mode, Concurrency is the number of tablets to reload at once // *per cluster*. uint32 concurrency = 5; // WaitPosition is the replication position that replicating tablets should // reach prior to reloading their schemas. // // Does not apply in Tablets mode. string wait_position = 6; // IncludePrimary, if set, will reload the schemas on PRIMARY tablets as // well as REPLICA and RDONLY. // // Does not apply in Tablets mode. bool include_primary = 7; } message ReloadSchemasResponse { // KeyspaceResult is a grouping of a Keyspace and any log events that // occurred in that keyspace during a schema reload (usually associated with // partial errors - ReloadSchemas requests are best-effort). // // It is only set when a ReloadSchemas request mandates Keyspaces mode // (see ReloadSchemasRequest). message KeyspaceResult { Keyspace keyspace = 1; repeated logutil.Event events = 2; } // KeyspaceResults is the list of KeyspaceResult objects for a ReloadSchemas // operation. It is only set when the request mandates Keyspaces mode (see // ReloadSchemasRequest). repeated KeyspaceResult keyspace_results = 1; // ShardResult is a grouping of a Shard and any log events that occurred in // that shard during a schema reload (usually associated with partial // errors - ReloadSchemas requests are best-effort). // // It is only set when a ReloadSchemas request mandates KeyspaceShards mode // (see ReloadSchemasRequest). message ShardResult { Shard shard = 1; repeated logutil.Event events = 2; } // ShardResults is the list of ShardResult objects for a ReloadSchemas // operation. It is only set when the request mandates KeyspaceShards mode // (see ReloadSchemasRequest). repeated ShardResult shard_results = 2; // TabletResult is a grouping of a Tablet and the result of reloading that // Tablet's schema. Result will either be the string "ok", or the error // message from that tablet. Note ReloadSchemas is best-effort, so tablet's // failing to reload is not treated as an overall failure. // // It is only set when a ReloadSchemas request mandates Tablets mode (see // ReloadSchemasRequest). message TabletResult { Tablet tablet = 1; string result = 2; } // TabletResults is the list of TabletResult objects for a ReloadSchemas // operation. It is only set when the request mandates Tablets mode (see // ReloadSchemasRequest). repeated TabletResult tablet_results = 3; } message ReloadSchemaShardRequest { string cluster_id = 1; string keyspace = 2; string shard = 3; string wait_position = 4; bool include_primary = 5; uint32 concurrency = 6; } message ReloadSchemaShardResponse { repeated logutil.Event events = 1; } message RefreshTabletReplicationSourceRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message RefreshTabletReplicationSourceResponse { string keyspace = 1; string shard = 2; topodata.TabletAlias primary = 3; Cluster cluster = 4; } message RemoveKeyspaceCellRequest { string cluster_id = 1; string keyspace = 2; string cell = 3; bool force = 4; bool recursive = 5; } message RemoveKeyspaceCellResponse { string status = 1; } message RunHealthCheckRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message RunHealthCheckResponse { string status = 1; Cluster cluster = 2; } message SetReadOnlyRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message SetReadOnlyResponse { } message SetReadWriteRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message SetReadWriteResponse { } message StartReplicationRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message StartReplicationResponse { string status = 1; Cluster cluster = 2; } message StopReplicationRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message StopReplicationResponse { string status = 1; Cluster cluster = 2; } message TabletExternallyPromotedRequest { // Tablet is the alias of the tablet that was promoted externally and should // be updated to the shard primary in the topo. topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message TabletExternallyPromotedResponse { Cluster cluster = 1; string keyspace = 2; string shard = 3; topodata.TabletAlias new_primary = 4; topodata.TabletAlias old_primary = 5; } message TabletExternallyReparentedRequest { topodata.TabletAlias alias = 1; repeated string cluster_ids = 2; } message ValidateRequest { string cluster_id = 1; bool ping_tablets = 2; } message ValidateKeyspaceRequest { string cluster_id = 1; string keyspace = 2; bool ping_tablets = 3; } message ValidateSchemaKeyspaceRequest { string cluster_id = 1; string keyspace = 2; } message ValidateShardRequest { string cluster_id = 1; string keyspace = 2; string shard = 3; bool ping_tablets = 4; } message ValidateVersionKeyspaceRequest { string cluster_id = 1; string keyspace = 2; } message ValidateVersionShardRequest { string cluster_id = 1; string keyspace = 2; string shard = 3; } message VTExplainRequest { string cluster = 1; string keyspace = 2; string sql = 3; } message VTExplainResponse { string response = 1; }