From 69527e5ff572e5f8989fede53bedf91b6a712ce7 Mon Sep 17 00:00:00 2001 From: Rohit Nayak Date: Sun, 8 Oct 2023 22:32:25 +0200 Subject: [PATCH] Add workflow metadata to keyspace topo object. Save it currently only for movetables and use the cached information, if available, to only contact primaries of participating shards for all workflow commands Signed-off-by: Rohit Nayak --- go/vt/proto/topodata/topodata.pb.go | 686 ++++++++++++-------- go/vt/proto/topodata/topodata_vtproto.pb.go | 406 ++++++++++++ go/vt/topo/keyspace.go | 2 +- go/vt/topo/keyspace_workflow.go | 98 +++ go/vt/topo/workflow.go | 127 ---- go/vt/vtctl/workflow/utils.go | 42 +- go/vt/wrangler/materializer.go | 20 +- go/vt/wrangler/vexec.go | 9 +- proto/topodata.proto | 12 + web/vtadmin/src/proto/vtadmin.d.ts | 127 ++++ web/vtadmin/src/proto/vtadmin.js | 377 ++++++++++- 11 files changed, 1489 insertions(+), 417 deletions(-) create mode 100644 go/vt/topo/keyspace_workflow.go delete mode 100644 go/vt/topo/workflow.go diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index 43ecdbce963..6a8d5134fc4 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -238,7 +238,7 @@ func (x ShardReplicationError_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ShardReplicationError_Type.Descriptor instead. func (ShardReplicationError_Type) EnumDescriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{6, 0} + return file_topodata_proto_rawDescGZIP(), []int{7, 0} } // KeyRange describes a range of sharding keys, when range-based @@ -650,6 +650,85 @@ func (x *Shard) GetIsPrimaryServing() bool { return false } +type WorkflowMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + TargetShards []string `protobuf:"bytes,4,rep,name=target_shards,json=targetShards,proto3" json:"target_shards,omitempty"` + SourceKeyspace string `protobuf:"bytes,5,opt,name=source_keyspace,json=sourceKeyspace,proto3" json:"source_keyspace,omitempty"` + SourceShards []string `protobuf:"bytes,6,rep,name=source_shards,json=sourceShards,proto3" json:"source_shards,omitempty"` +} + +func (x *WorkflowMetadata) Reset() { + *x = WorkflowMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_topodata_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowMetadata) ProtoMessage() {} + +func (x *WorkflowMetadata) ProtoReflect() protoreflect.Message { + mi := &file_topodata_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowMetadata.ProtoReflect.Descriptor instead. +func (*WorkflowMetadata) Descriptor() ([]byte, []int) { + return file_topodata_proto_rawDescGZIP(), []int{4} +} + +func (x *WorkflowMetadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkflowMetadata) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *WorkflowMetadata) GetTargetShards() []string { + if x != nil { + return x.TargetShards + } + return nil +} + +func (x *WorkflowMetadata) GetSourceKeyspace() string { + if x != nil { + return x.SourceKeyspace + } + return "" +} + +func (x *WorkflowMetadata) GetSourceShards() []string { + if x != nil { + return x.SourceShards + } + return nil +} + // A Keyspace contains data about a keyspace. type Keyspace struct { state protoimpl.MessageState @@ -682,12 +761,14 @@ type Keyspace struct { // used for various system metadata that is stored in each // tablet's mysqld instance. SidecarDbName string `protobuf:"bytes,10,opt,name=sidecar_db_name,json=sidecarDbName,proto3" json:"sidecar_db_name,omitempty"` + // WorkflowMetadata is the metadata for workflows in this keyspace. + Workflows []*WorkflowMetadata `protobuf:"bytes,11,rep,name=workflows,proto3" json:"workflows,omitempty"` } func (x *Keyspace) Reset() { *x = Keyspace{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[4] + mi := &file_topodata_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -700,7 +781,7 @@ func (x *Keyspace) String() string { func (*Keyspace) ProtoMessage() {} func (x *Keyspace) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[4] + mi := &file_topodata_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -713,7 +794,7 @@ func (x *Keyspace) ProtoReflect() protoreflect.Message { // Deprecated: Use Keyspace.ProtoReflect.Descriptor instead. func (*Keyspace) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{4} + return file_topodata_proto_rawDescGZIP(), []int{5} } func (x *Keyspace) GetServedFroms() []*Keyspace_ServedFrom { @@ -765,6 +846,13 @@ func (x *Keyspace) GetSidecarDbName() string { return "" } +func (x *Keyspace) GetWorkflows() []*WorkflowMetadata { + if x != nil { + return x.Workflows + } + return nil +} + // ShardReplication describes the MySQL replication relationships // whithin a cell. type ShardReplication struct { @@ -780,7 +868,7 @@ type ShardReplication struct { func (x *ShardReplication) Reset() { *x = ShardReplication{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[5] + mi := &file_topodata_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -793,7 +881,7 @@ func (x *ShardReplication) String() string { func (*ShardReplication) ProtoMessage() {} func (x *ShardReplication) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[5] + mi := &file_topodata_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -806,7 +894,7 @@ func (x *ShardReplication) ProtoReflect() protoreflect.Message { // Deprecated: Use ShardReplication.ProtoReflect.Descriptor instead. func (*ShardReplication) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{5} + return file_topodata_proto_rawDescGZIP(), []int{6} } func (x *ShardReplication) GetNodes() []*ShardReplication_Node { @@ -832,7 +920,7 @@ type ShardReplicationError struct { func (x *ShardReplicationError) Reset() { *x = ShardReplicationError{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[6] + mi := &file_topodata_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -845,7 +933,7 @@ func (x *ShardReplicationError) String() string { func (*ShardReplicationError) ProtoMessage() {} func (x *ShardReplicationError) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[6] + mi := &file_topodata_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -858,7 +946,7 @@ func (x *ShardReplicationError) ProtoReflect() protoreflect.Message { // Deprecated: Use ShardReplicationError.ProtoReflect.Descriptor instead. func (*ShardReplicationError) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{6} + return file_topodata_proto_rawDescGZIP(), []int{7} } func (x *ShardReplicationError) GetType() ShardReplicationError_Type { @@ -889,7 +977,7 @@ type ShardReference struct { func (x *ShardReference) Reset() { *x = ShardReference{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[7] + mi := &file_topodata_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -902,7 +990,7 @@ func (x *ShardReference) String() string { func (*ShardReference) ProtoMessage() {} func (x *ShardReference) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[7] + mi := &file_topodata_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -915,7 +1003,7 @@ func (x *ShardReference) ProtoReflect() protoreflect.Message { // Deprecated: Use ShardReference.ProtoReflect.Descriptor instead. func (*ShardReference) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{7} + return file_topodata_proto_rawDescGZIP(), []int{8} } func (x *ShardReference) GetName() string { @@ -948,7 +1036,7 @@ type ShardTabletControl struct { func (x *ShardTabletControl) Reset() { *x = ShardTabletControl{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[8] + mi := &file_topodata_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -961,7 +1049,7 @@ func (x *ShardTabletControl) String() string { func (*ShardTabletControl) ProtoMessage() {} func (x *ShardTabletControl) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[8] + mi := &file_topodata_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -974,7 +1062,7 @@ func (x *ShardTabletControl) ProtoReflect() protoreflect.Message { // Deprecated: Use ShardTabletControl.ProtoReflect.Descriptor instead. func (*ShardTabletControl) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{8} + return file_topodata_proto_rawDescGZIP(), []int{9} } func (x *ShardTabletControl) GetName() string { @@ -1018,7 +1106,7 @@ type ThrottledAppRule struct { func (x *ThrottledAppRule) Reset() { *x = ThrottledAppRule{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[9] + mi := &file_topodata_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1031,7 +1119,7 @@ func (x *ThrottledAppRule) String() string { func (*ThrottledAppRule) ProtoMessage() {} func (x *ThrottledAppRule) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[9] + mi := &file_topodata_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1044,7 +1132,7 @@ func (x *ThrottledAppRule) ProtoReflect() protoreflect.Message { // Deprecated: Use ThrottledAppRule.ProtoReflect.Descriptor instead. func (*ThrottledAppRule) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{9} + return file_topodata_proto_rawDescGZIP(), []int{10} } func (x *ThrottledAppRule) GetName() string { @@ -1100,7 +1188,7 @@ type ThrottlerConfig struct { func (x *ThrottlerConfig) Reset() { *x = ThrottlerConfig{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[10] + mi := &file_topodata_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1113,7 +1201,7 @@ func (x *ThrottlerConfig) String() string { func (*ThrottlerConfig) ProtoMessage() {} func (x *ThrottlerConfig) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[10] + mi := &file_topodata_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1126,7 +1214,7 @@ func (x *ThrottlerConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ThrottlerConfig.ProtoReflect.Descriptor instead. func (*ThrottlerConfig) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{10} + return file_topodata_proto_rawDescGZIP(), []int{11} } func (x *ThrottlerConfig) GetEnabled() bool { @@ -1183,7 +1271,7 @@ type SrvKeyspace struct { func (x *SrvKeyspace) Reset() { *x = SrvKeyspace{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[11] + mi := &file_topodata_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1196,7 +1284,7 @@ func (x *SrvKeyspace) String() string { func (*SrvKeyspace) ProtoMessage() {} func (x *SrvKeyspace) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[11] + mi := &file_topodata_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1209,7 +1297,7 @@ func (x *SrvKeyspace) ProtoReflect() protoreflect.Message { // Deprecated: Use SrvKeyspace.ProtoReflect.Descriptor instead. func (*SrvKeyspace) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{11} + return file_topodata_proto_rawDescGZIP(), []int{12} } func (x *SrvKeyspace) GetPartitions() []*SrvKeyspace_KeyspacePartition { @@ -1254,7 +1342,7 @@ type CellInfo struct { func (x *CellInfo) Reset() { *x = CellInfo{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[12] + mi := &file_topodata_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1267,7 +1355,7 @@ func (x *CellInfo) String() string { func (*CellInfo) ProtoMessage() {} func (x *CellInfo) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[12] + mi := &file_topodata_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1280,7 +1368,7 @@ func (x *CellInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CellInfo.ProtoReflect.Descriptor instead. func (*CellInfo) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{12} + return file_topodata_proto_rawDescGZIP(), []int{13} } func (x *CellInfo) GetServerAddress() string { @@ -1310,7 +1398,7 @@ type CellsAlias struct { func (x *CellsAlias) Reset() { *x = CellsAlias{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[13] + mi := &file_topodata_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1323,7 +1411,7 @@ func (x *CellsAlias) String() string { func (*CellsAlias) ProtoMessage() {} func (x *CellsAlias) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[13] + mi := &file_topodata_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1336,7 +1424,7 @@ func (x *CellsAlias) ProtoReflect() protoreflect.Message { // Deprecated: Use CellsAlias.ProtoReflect.Descriptor instead. func (*CellsAlias) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{13} + return file_topodata_proto_rawDescGZIP(), []int{14} } func (x *CellsAlias) GetCells() []string { @@ -1359,7 +1447,7 @@ type TopoConfig struct { func (x *TopoConfig) Reset() { *x = TopoConfig{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[14] + mi := &file_topodata_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1372,7 +1460,7 @@ func (x *TopoConfig) String() string { func (*TopoConfig) ProtoMessage() {} func (x *TopoConfig) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[14] + mi := &file_topodata_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1385,7 +1473,7 @@ func (x *TopoConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use TopoConfig.ProtoReflect.Descriptor instead. func (*TopoConfig) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{14} + return file_topodata_proto_rawDescGZIP(), []int{15} } func (x *TopoConfig) GetTopoType() string { @@ -1420,7 +1508,7 @@ type ExternalVitessCluster struct { func (x *ExternalVitessCluster) Reset() { *x = ExternalVitessCluster{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[15] + mi := &file_topodata_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1433,7 +1521,7 @@ func (x *ExternalVitessCluster) String() string { func (*ExternalVitessCluster) ProtoMessage() {} func (x *ExternalVitessCluster) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[15] + mi := &file_topodata_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1446,7 +1534,7 @@ func (x *ExternalVitessCluster) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalVitessCluster.ProtoReflect.Descriptor instead. func (*ExternalVitessCluster) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{15} + return file_topodata_proto_rawDescGZIP(), []int{16} } func (x *ExternalVitessCluster) GetTopoConfig() *TopoConfig { @@ -1468,7 +1556,7 @@ type ExternalClusters struct { func (x *ExternalClusters) Reset() { *x = ExternalClusters{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[16] + mi := &file_topodata_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1481,7 +1569,7 @@ func (x *ExternalClusters) String() string { func (*ExternalClusters) ProtoMessage() {} func (x *ExternalClusters) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[16] + mi := &file_topodata_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1494,7 +1582,7 @@ func (x *ExternalClusters) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalClusters.ProtoReflect.Descriptor instead. func (*ExternalClusters) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{16} + return file_topodata_proto_rawDescGZIP(), []int{17} } func (x *ExternalClusters) GetVitessCluster() []*ExternalVitessCluster { @@ -1527,7 +1615,7 @@ type Shard_SourceShard struct { func (x *Shard_SourceShard) Reset() { *x = Shard_SourceShard{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[19] + mi := &file_topodata_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1540,7 +1628,7 @@ func (x *Shard_SourceShard) String() string { func (*Shard_SourceShard) ProtoMessage() {} func (x *Shard_SourceShard) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[19] + mi := &file_topodata_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1609,7 +1697,7 @@ type Shard_TabletControl struct { func (x *Shard_TabletControl) Reset() { *x = Shard_TabletControl{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[20] + mi := &file_topodata_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1622,7 +1710,7 @@ func (x *Shard_TabletControl) String() string { func (*Shard_TabletControl) ProtoMessage() {} func (x *Shard_TabletControl) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[20] + mi := &file_topodata_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1684,7 +1772,7 @@ type Keyspace_ServedFrom struct { func (x *Keyspace_ServedFrom) Reset() { *x = Keyspace_ServedFrom{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[21] + mi := &file_topodata_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1697,7 +1785,7 @@ func (x *Keyspace_ServedFrom) String() string { func (*Keyspace_ServedFrom) ProtoMessage() {} func (x *Keyspace_ServedFrom) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[21] + mi := &file_topodata_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1710,7 +1798,7 @@ func (x *Keyspace_ServedFrom) ProtoReflect() protoreflect.Message { // Deprecated: Use Keyspace_ServedFrom.ProtoReflect.Descriptor instead. func (*Keyspace_ServedFrom) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{4, 0} + return file_topodata_proto_rawDescGZIP(), []int{5, 0} } func (x *Keyspace_ServedFrom) GetTabletType() TabletType { @@ -1746,7 +1834,7 @@ type ShardReplication_Node struct { func (x *ShardReplication_Node) Reset() { *x = ShardReplication_Node{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[22] + mi := &file_topodata_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1759,7 +1847,7 @@ func (x *ShardReplication_Node) String() string { func (*ShardReplication_Node) ProtoMessage() {} func (x *ShardReplication_Node) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[22] + mi := &file_topodata_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1772,7 +1860,7 @@ func (x *ShardReplication_Node) ProtoReflect() protoreflect.Message { // Deprecated: Use ShardReplication_Node.ProtoReflect.Descriptor instead. func (*ShardReplication_Node) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{5, 0} + return file_topodata_proto_rawDescGZIP(), []int{6, 0} } func (x *ShardReplication_Node) GetTabletAlias() *TabletAlias { @@ -1798,7 +1886,7 @@ type SrvKeyspace_KeyspacePartition struct { func (x *SrvKeyspace_KeyspacePartition) Reset() { *x = SrvKeyspace_KeyspacePartition{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[24] + mi := &file_topodata_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1811,7 +1899,7 @@ func (x *SrvKeyspace_KeyspacePartition) String() string { func (*SrvKeyspace_KeyspacePartition) ProtoMessage() {} func (x *SrvKeyspace_KeyspacePartition) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[24] + mi := &file_topodata_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1824,7 +1912,7 @@ func (x *SrvKeyspace_KeyspacePartition) ProtoReflect() protoreflect.Message { // Deprecated: Use SrvKeyspace_KeyspacePartition.ProtoReflect.Descriptor instead. func (*SrvKeyspace_KeyspacePartition) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{11, 0} + return file_topodata_proto_rawDescGZIP(), []int{12, 0} } func (x *SrvKeyspace_KeyspacePartition) GetServedType() TabletType { @@ -1864,7 +1952,7 @@ type SrvKeyspace_ServedFrom struct { func (x *SrvKeyspace_ServedFrom) Reset() { *x = SrvKeyspace_ServedFrom{} if protoimpl.UnsafeEnabled { - mi := &file_topodata_proto_msgTypes[25] + mi := &file_topodata_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1877,7 +1965,7 @@ func (x *SrvKeyspace_ServedFrom) String() string { func (*SrvKeyspace_ServedFrom) ProtoMessage() {} func (x *SrvKeyspace_ServedFrom) ProtoReflect() protoreflect.Message { - mi := &file_topodata_proto_msgTypes[25] + mi := &file_topodata_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1890,7 +1978,7 @@ func (x *SrvKeyspace_ServedFrom) ProtoReflect() protoreflect.Message { // Deprecated: Use SrvKeyspace_ServedFrom.ProtoReflect.Descriptor instead. func (*SrvKeyspace_ServedFrom) Descriptor() ([]byte, []int) { - return file_topodata_proto_rawDescGZIP(), []int{11, 1} + return file_topodata_proto_rawDescGZIP(), []int{12, 1} } func (x *SrvKeyspace_ServedFrom) GetTabletType() TabletType { @@ -2006,7 +2094,18 @@ var file_topodata_proto_rawDesc = []byte{ 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x4a, 0x04, 0x08, 0x03, 0x10, - 0x04, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x85, 0x04, + 0x04, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xad, 0x01, + 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x12, + 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 0x22, 0xbf, 0x04, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x73, @@ -2030,157 +2129,160 @@ var file_topodata_proto_rawDesc = []byte{ 0x66, 0x69, 0x67, 0x52, 0x0f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, - 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x44, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x75, 0x0a, 0x0a, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, - 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x8b, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x1a, 0x40, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x15, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x38, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x22, 0x39, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, - 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, - 0x59, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0e, - 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x12, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, - 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x34, 0x0a, 0x16, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x12, 0x2b, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, - 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x74, 0x22, 0xce, 0x02, 0x0a, 0x0f, 0x54, 0x68, - 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x13, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x73, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x53, 0x0a, 0x0e, 0x74, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x1a, 0x5c, 0x0a, 0x12, - 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb6, 0x04, 0x0a, 0x0b, 0x53, - 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x72, - 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, + 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x44, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x1a, 0x75, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4a, 0x04, 0x08, + 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, + 0x8b, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x04, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0xc6, 0x01, + 0x0a, 0x15, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x0b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x39, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, + 0x15, 0x0a, 0x11, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x4d, 0x49, 0x53, 0x4d, + 0x41, 0x54, 0x43, 0x48, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, + 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x8f, 0x01, + 0x0a, 0x12, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x08, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, + 0x81, 0x01, 0x0a, 0x10, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, + 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x2b, + 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, + 0x78, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x65, + 0x6d, 0x70, 0x74, 0x22, 0xce, 0x02, 0x0a, 0x0f, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x13, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x61, 0x73, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6c, + 0x66, 0x12, 0x53, 0x0a, 0x0e, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, + 0x70, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, + 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x1a, 0x5c, 0x0a, 0x12, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb6, 0x04, 0x0a, 0x0b, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x72, 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x44, 0x0a, 0x10, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, - 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, - 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x74, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe1, 0x01, 0x0a, - 0x11, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x73, - 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x50, - 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x13, 0x73, 0x68, 0x61, - 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, - 0x1a, 0x5f, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x35, - 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, - 0x05, 0x10, 0x06, 0x22, 0x4b, 0x0a, 0x08, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, - 0x22, 0x22, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x55, 0x0a, 0x0a, 0x54, 0x6f, 0x70, 0x6f, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x4e, 0x0a, 0x15, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69, 0x74, 0x65, 0x73, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5a, 0x0a, 0x10, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x46, 0x0a, 0x0e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69, 0x74, 0x65, 0x73, - 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2a, 0x28, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, - 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, - 0x01, 0x2a, 0x9d, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, - 0x53, 0x54, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, - 0x41, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, - 0x09, 0x0a, 0x05, 0x42, 0x41, 0x54, 0x43, 0x48, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, - 0x41, 0x52, 0x45, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, - 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x43, 0x4b, 0x55, - 0x50, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x07, - 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x08, 0x1a, 0x02, 0x10, - 0x01, 0x42, 0x38, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x25, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, + 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x72, + 0x76, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, + 0x12, 0x44, 0x0a, 0x10, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe1, 0x01, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, + 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x13, 0x73, 0x68, 0x61, 0x72, 0x64, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x1a, 0x5f, 0x0a, 0x0a, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x35, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x4b, 0x0a, + 0x08, 0x43, 0x65, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x72, 0x6f, 0x6f, 0x74, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x22, 0x0a, 0x0a, 0x43, 0x65, + 0x6c, 0x6c, 0x73, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x55, + 0x0a, 0x0a, 0x54, 0x6f, 0x70, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, + 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x4e, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x56, 0x69, 0x74, 0x65, 0x73, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x35, + 0x0a, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x6f, 0x70, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x74, 0x6f, 0x70, 0x6f, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5a, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0e, 0x76, 0x69, 0x74, + 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69, 0x74, 0x65, 0x73, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x0d, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2a, 0x28, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x01, 0x2a, 0x9d, 0x01, 0x0a, 0x0a, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x4d, 0x41, + 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x53, 0x54, 0x45, 0x52, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x52, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x41, 0x54, + 0x43, 0x48, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x41, 0x52, 0x45, 0x10, 0x04, 0x12, + 0x10, 0x0a, 0x0c, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x10, + 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x06, 0x12, 0x0b, 0x0a, + 0x07, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x52, + 0x41, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x42, 0x38, 0x0a, 0x0f, 0x69, + 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x25, + 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, + 0x6f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2196,7 +2298,7 @@ func file_topodata_proto_rawDescGZIP() []byte { } var file_topodata_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_topodata_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_topodata_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_topodata_proto_goTypes = []interface{}{ (KeyspaceType)(0), // 0: topodata.KeyspaceType (TabletType)(0), // 1: topodata.TabletType @@ -2205,72 +2307,74 @@ var file_topodata_proto_goTypes = []interface{}{ (*TabletAlias)(nil), // 4: topodata.TabletAlias (*Tablet)(nil), // 5: topodata.Tablet (*Shard)(nil), // 6: topodata.Shard - (*Keyspace)(nil), // 7: topodata.Keyspace - (*ShardReplication)(nil), // 8: topodata.ShardReplication - (*ShardReplicationError)(nil), // 9: topodata.ShardReplicationError - (*ShardReference)(nil), // 10: topodata.ShardReference - (*ShardTabletControl)(nil), // 11: topodata.ShardTabletControl - (*ThrottledAppRule)(nil), // 12: topodata.ThrottledAppRule - (*ThrottlerConfig)(nil), // 13: topodata.ThrottlerConfig - (*SrvKeyspace)(nil), // 14: topodata.SrvKeyspace - (*CellInfo)(nil), // 15: topodata.CellInfo - (*CellsAlias)(nil), // 16: topodata.CellsAlias - (*TopoConfig)(nil), // 17: topodata.TopoConfig - (*ExternalVitessCluster)(nil), // 18: topodata.ExternalVitessCluster - (*ExternalClusters)(nil), // 19: topodata.ExternalClusters - nil, // 20: topodata.Tablet.PortMapEntry - nil, // 21: topodata.Tablet.TagsEntry - (*Shard_SourceShard)(nil), // 22: topodata.Shard.SourceShard - (*Shard_TabletControl)(nil), // 23: topodata.Shard.TabletControl - (*Keyspace_ServedFrom)(nil), // 24: topodata.Keyspace.ServedFrom - (*ShardReplication_Node)(nil), // 25: topodata.ShardReplication.Node - nil, // 26: topodata.ThrottlerConfig.ThrottledAppsEntry - (*SrvKeyspace_KeyspacePartition)(nil), // 27: topodata.SrvKeyspace.KeyspacePartition - (*SrvKeyspace_ServedFrom)(nil), // 28: topodata.SrvKeyspace.ServedFrom - (*vttime.Time)(nil), // 29: vttime.Time + (*WorkflowMetadata)(nil), // 7: topodata.WorkflowMetadata + (*Keyspace)(nil), // 8: topodata.Keyspace + (*ShardReplication)(nil), // 9: topodata.ShardReplication + (*ShardReplicationError)(nil), // 10: topodata.ShardReplicationError + (*ShardReference)(nil), // 11: topodata.ShardReference + (*ShardTabletControl)(nil), // 12: topodata.ShardTabletControl + (*ThrottledAppRule)(nil), // 13: topodata.ThrottledAppRule + (*ThrottlerConfig)(nil), // 14: topodata.ThrottlerConfig + (*SrvKeyspace)(nil), // 15: topodata.SrvKeyspace + (*CellInfo)(nil), // 16: topodata.CellInfo + (*CellsAlias)(nil), // 17: topodata.CellsAlias + (*TopoConfig)(nil), // 18: topodata.TopoConfig + (*ExternalVitessCluster)(nil), // 19: topodata.ExternalVitessCluster + (*ExternalClusters)(nil), // 20: topodata.ExternalClusters + nil, // 21: topodata.Tablet.PortMapEntry + nil, // 22: topodata.Tablet.TagsEntry + (*Shard_SourceShard)(nil), // 23: topodata.Shard.SourceShard + (*Shard_TabletControl)(nil), // 24: topodata.Shard.TabletControl + (*Keyspace_ServedFrom)(nil), // 25: topodata.Keyspace.ServedFrom + (*ShardReplication_Node)(nil), // 26: topodata.ShardReplication.Node + nil, // 27: topodata.ThrottlerConfig.ThrottledAppsEntry + (*SrvKeyspace_KeyspacePartition)(nil), // 28: topodata.SrvKeyspace.KeyspacePartition + (*SrvKeyspace_ServedFrom)(nil), // 29: topodata.SrvKeyspace.ServedFrom + (*vttime.Time)(nil), // 30: vttime.Time } var file_topodata_proto_depIdxs = []int32{ 4, // 0: topodata.Tablet.alias:type_name -> topodata.TabletAlias - 20, // 1: topodata.Tablet.port_map:type_name -> topodata.Tablet.PortMapEntry + 21, // 1: topodata.Tablet.port_map:type_name -> topodata.Tablet.PortMapEntry 3, // 2: topodata.Tablet.key_range:type_name -> topodata.KeyRange 1, // 3: topodata.Tablet.type:type_name -> topodata.TabletType - 21, // 4: topodata.Tablet.tags:type_name -> topodata.Tablet.TagsEntry - 29, // 5: topodata.Tablet.primary_term_start_time:type_name -> vttime.Time + 22, // 4: topodata.Tablet.tags:type_name -> topodata.Tablet.TagsEntry + 30, // 5: topodata.Tablet.primary_term_start_time:type_name -> vttime.Time 4, // 6: topodata.Shard.primary_alias:type_name -> topodata.TabletAlias - 29, // 7: topodata.Shard.primary_term_start_time:type_name -> vttime.Time + 30, // 7: topodata.Shard.primary_term_start_time:type_name -> vttime.Time 3, // 8: topodata.Shard.key_range:type_name -> topodata.KeyRange - 22, // 9: topodata.Shard.source_shards:type_name -> topodata.Shard.SourceShard - 23, // 10: topodata.Shard.tablet_controls:type_name -> topodata.Shard.TabletControl - 24, // 11: topodata.Keyspace.served_froms:type_name -> topodata.Keyspace.ServedFrom + 23, // 9: topodata.Shard.source_shards:type_name -> topodata.Shard.SourceShard + 24, // 10: topodata.Shard.tablet_controls:type_name -> topodata.Shard.TabletControl + 25, // 11: topodata.Keyspace.served_froms:type_name -> topodata.Keyspace.ServedFrom 0, // 12: topodata.Keyspace.keyspace_type:type_name -> topodata.KeyspaceType - 29, // 13: topodata.Keyspace.snapshot_time:type_name -> vttime.Time - 13, // 14: topodata.Keyspace.throttler_config:type_name -> topodata.ThrottlerConfig - 25, // 15: topodata.ShardReplication.nodes:type_name -> topodata.ShardReplication.Node - 2, // 16: topodata.ShardReplicationError.type:type_name -> topodata.ShardReplicationError.Type - 4, // 17: topodata.ShardReplicationError.tablet_alias:type_name -> topodata.TabletAlias - 3, // 18: topodata.ShardReference.key_range:type_name -> topodata.KeyRange - 3, // 19: topodata.ShardTabletControl.key_range:type_name -> topodata.KeyRange - 29, // 20: topodata.ThrottledAppRule.expires_at:type_name -> vttime.Time - 26, // 21: topodata.ThrottlerConfig.throttled_apps:type_name -> topodata.ThrottlerConfig.ThrottledAppsEntry - 27, // 22: topodata.SrvKeyspace.partitions:type_name -> topodata.SrvKeyspace.KeyspacePartition - 28, // 23: topodata.SrvKeyspace.served_from:type_name -> topodata.SrvKeyspace.ServedFrom - 13, // 24: topodata.SrvKeyspace.throttler_config:type_name -> topodata.ThrottlerConfig - 17, // 25: topodata.ExternalVitessCluster.topo_config:type_name -> topodata.TopoConfig - 18, // 26: topodata.ExternalClusters.vitess_cluster:type_name -> topodata.ExternalVitessCluster - 3, // 27: topodata.Shard.SourceShard.key_range:type_name -> topodata.KeyRange - 1, // 28: topodata.Shard.TabletControl.tablet_type:type_name -> topodata.TabletType - 1, // 29: topodata.Keyspace.ServedFrom.tablet_type:type_name -> topodata.TabletType - 4, // 30: topodata.ShardReplication.Node.tablet_alias:type_name -> topodata.TabletAlias - 12, // 31: topodata.ThrottlerConfig.ThrottledAppsEntry.value:type_name -> topodata.ThrottledAppRule - 1, // 32: topodata.SrvKeyspace.KeyspacePartition.served_type:type_name -> topodata.TabletType - 10, // 33: topodata.SrvKeyspace.KeyspacePartition.shard_references:type_name -> topodata.ShardReference - 11, // 34: topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls:type_name -> topodata.ShardTabletControl - 1, // 35: topodata.SrvKeyspace.ServedFrom.tablet_type:type_name -> topodata.TabletType - 36, // [36:36] is the sub-list for method output_type - 36, // [36:36] is the sub-list for method input_type - 36, // [36:36] is the sub-list for extension type_name - 36, // [36:36] is the sub-list for extension extendee - 0, // [0:36] is the sub-list for field type_name + 30, // 13: topodata.Keyspace.snapshot_time:type_name -> vttime.Time + 14, // 14: topodata.Keyspace.throttler_config:type_name -> topodata.ThrottlerConfig + 7, // 15: topodata.Keyspace.workflows:type_name -> topodata.WorkflowMetadata + 26, // 16: topodata.ShardReplication.nodes:type_name -> topodata.ShardReplication.Node + 2, // 17: topodata.ShardReplicationError.type:type_name -> topodata.ShardReplicationError.Type + 4, // 18: topodata.ShardReplicationError.tablet_alias:type_name -> topodata.TabletAlias + 3, // 19: topodata.ShardReference.key_range:type_name -> topodata.KeyRange + 3, // 20: topodata.ShardTabletControl.key_range:type_name -> topodata.KeyRange + 30, // 21: topodata.ThrottledAppRule.expires_at:type_name -> vttime.Time + 27, // 22: topodata.ThrottlerConfig.throttled_apps:type_name -> topodata.ThrottlerConfig.ThrottledAppsEntry + 28, // 23: topodata.SrvKeyspace.partitions:type_name -> topodata.SrvKeyspace.KeyspacePartition + 29, // 24: topodata.SrvKeyspace.served_from:type_name -> topodata.SrvKeyspace.ServedFrom + 14, // 25: topodata.SrvKeyspace.throttler_config:type_name -> topodata.ThrottlerConfig + 18, // 26: topodata.ExternalVitessCluster.topo_config:type_name -> topodata.TopoConfig + 19, // 27: topodata.ExternalClusters.vitess_cluster:type_name -> topodata.ExternalVitessCluster + 3, // 28: topodata.Shard.SourceShard.key_range:type_name -> topodata.KeyRange + 1, // 29: topodata.Shard.TabletControl.tablet_type:type_name -> topodata.TabletType + 1, // 30: topodata.Keyspace.ServedFrom.tablet_type:type_name -> topodata.TabletType + 4, // 31: topodata.ShardReplication.Node.tablet_alias:type_name -> topodata.TabletAlias + 13, // 32: topodata.ThrottlerConfig.ThrottledAppsEntry.value:type_name -> topodata.ThrottledAppRule + 1, // 33: topodata.SrvKeyspace.KeyspacePartition.served_type:type_name -> topodata.TabletType + 11, // 34: topodata.SrvKeyspace.KeyspacePartition.shard_references:type_name -> topodata.ShardReference + 12, // 35: topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls:type_name -> topodata.ShardTabletControl + 1, // 36: topodata.SrvKeyspace.ServedFrom.tablet_type:type_name -> topodata.TabletType + 37, // [37:37] is the sub-list for method output_type + 37, // [37:37] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name } func init() { file_topodata_proto_init() } @@ -2328,7 +2432,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Keyspace); i { + switch v := v.(*WorkflowMetadata); i { case 0: return &v.state case 1: @@ -2340,7 +2444,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShardReplication); i { + switch v := v.(*Keyspace); i { case 0: return &v.state case 1: @@ -2352,7 +2456,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShardReplicationError); i { + switch v := v.(*ShardReplication); i { case 0: return &v.state case 1: @@ -2364,7 +2468,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShardReference); i { + switch v := v.(*ShardReplicationError); i { case 0: return &v.state case 1: @@ -2376,7 +2480,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShardTabletControl); i { + switch v := v.(*ShardReference); i { case 0: return &v.state case 1: @@ -2388,7 +2492,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThrottledAppRule); i { + switch v := v.(*ShardTabletControl); i { case 0: return &v.state case 1: @@ -2400,7 +2504,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ThrottlerConfig); i { + switch v := v.(*ThrottledAppRule); i { case 0: return &v.state case 1: @@ -2412,7 +2516,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SrvKeyspace); i { + switch v := v.(*ThrottlerConfig); i { case 0: return &v.state case 1: @@ -2424,7 +2528,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CellInfo); i { + switch v := v.(*SrvKeyspace); i { case 0: return &v.state case 1: @@ -2436,7 +2540,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CellsAlias); i { + switch v := v.(*CellInfo); i { case 0: return &v.state case 1: @@ -2448,7 +2552,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TopoConfig); i { + switch v := v.(*CellsAlias); i { case 0: return &v.state case 1: @@ -2460,7 +2564,7 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalVitessCluster); i { + switch v := v.(*TopoConfig); i { case 0: return &v.state case 1: @@ -2472,6 +2576,18 @@ func file_topodata_proto_init() { } } file_topodata_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalVitessCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_topodata_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExternalClusters); i { case 0: return &v.state @@ -2483,7 +2599,7 @@ func file_topodata_proto_init() { return nil } } - file_topodata_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_topodata_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Shard_SourceShard); i { case 0: return &v.state @@ -2495,7 +2611,7 @@ func file_topodata_proto_init() { return nil } } - file_topodata_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_topodata_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Shard_TabletControl); i { case 0: return &v.state @@ -2507,7 +2623,7 @@ func file_topodata_proto_init() { return nil } } - file_topodata_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_topodata_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Keyspace_ServedFrom); i { case 0: return &v.state @@ -2519,7 +2635,7 @@ func file_topodata_proto_init() { return nil } } - file_topodata_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_topodata_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ShardReplication_Node); i { case 0: return &v.state @@ -2531,7 +2647,7 @@ func file_topodata_proto_init() { return nil } } - file_topodata_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_topodata_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SrvKeyspace_KeyspacePartition); i { case 0: return &v.state @@ -2543,7 +2659,7 @@ func file_topodata_proto_init() { return nil } } - file_topodata_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_topodata_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SrvKeyspace_ServedFrom); i { case 0: return &v.state @@ -2562,7 +2678,7 @@ func file_topodata_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_topodata_proto_rawDesc, NumEnums: 3, - NumMessages: 26, + NumMessages: 27, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/topodata/topodata_vtproto.pb.go b/go/vt/proto/topodata/topodata_vtproto.pb.go index 5e675bb4ea0..8b440311def 100644 --- a/go/vt/proto/topodata/topodata_vtproto.pb.go +++ b/go/vt/proto/topodata/topodata_vtproto.pb.go @@ -199,6 +199,36 @@ func (m *Shard) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *WorkflowMetadata) CloneVT() *WorkflowMetadata { + if m == nil { + return (*WorkflowMetadata)(nil) + } + r := &WorkflowMetadata{ + Name: m.Name, + Type: m.Type, + SourceKeyspace: m.SourceKeyspace, + } + if rhs := m.TargetShards; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.TargetShards = tmpContainer + } + if rhs := m.SourceShards; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.SourceShards = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *WorkflowMetadata) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *Keyspace_ServedFrom) CloneVT() *Keyspace_ServedFrom { if m == nil { return (*Keyspace_ServedFrom)(nil) @@ -242,6 +272,13 @@ func (m *Keyspace) CloneVT() *Keyspace { } r.ServedFroms = tmpContainer } + if rhs := m.Workflows; rhs != nil { + tmpContainer := make([]*WorkflowMetadata, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Workflows = tmpContainer + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1062,6 +1099,78 @@ func (m *Shard) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *WorkflowMetadata) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WorkflowMetadata) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *WorkflowMetadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SourceShards) > 0 { + for iNdEx := len(m.SourceShards) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SourceShards[iNdEx]) + copy(dAtA[i:], m.SourceShards[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.SourceShards[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.SourceKeyspace) > 0 { + i -= len(m.SourceKeyspace) + copy(dAtA[i:], m.SourceKeyspace) + i = encodeVarint(dAtA, i, uint64(len(m.SourceKeyspace))) + i-- + dAtA[i] = 0x2a + } + if len(m.TargetShards) > 0 { + for iNdEx := len(m.TargetShards) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TargetShards[iNdEx]) + copy(dAtA[i:], m.TargetShards[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.TargetShards[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Keyspace_ServedFrom) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1146,6 +1255,18 @@ func (m *Keyspace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.Workflows) > 0 { + for iNdEx := len(m.Workflows) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Workflows[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } + } if len(m.SidecarDbName) > 0 { i -= len(m.SidecarDbName) copy(dAtA[i:], m.SidecarDbName) @@ -2221,6 +2342,40 @@ func (m *Shard) SizeVT() (n int) { return n } +func (m *WorkflowMetadata) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.TargetShards) > 0 { + for _, s := range m.TargetShards { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + l = len(m.SourceKeyspace) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.SourceShards) > 0 { + for _, s := range m.SourceShards { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + func (m *Keyspace_ServedFrom) SizeVT() (n int) { if m == nil { return 0 @@ -2279,6 +2434,12 @@ func (m *Keyspace) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } + if len(m.Workflows) > 0 { + for _, e := range m.Workflows { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } n += len(m.unknownFields) return n } @@ -4029,6 +4190,217 @@ func (m *Shard) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *WorkflowMetadata) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WorkflowMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WorkflowMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetShards", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetShards = append(m.TargetShards, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceKeyspace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceKeyspace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceShards", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceShards = append(m.SourceShards, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Keyspace_ServedFrom) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4413,6 +4785,40 @@ func (m *Keyspace) UnmarshalVT(dAtA []byte) error { } m.SidecarDbName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Workflows", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Workflows = append(m.Workflows, &WorkflowMetadata{}) + if err := m.Workflows[len(m.Workflows)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/go/vt/topo/keyspace.go b/go/vt/topo/keyspace.go index feb80c374e5..99de2ad3db7 100755 --- a/go/vt/topo/keyspace.go +++ b/go/vt/topo/keyspace.go @@ -203,7 +203,7 @@ func (ts *Server) GetKeyspace(ctx context.Context, keyspace string) (*KeyspaceIn if err = k.UnmarshalVT(data); err != nil { return nil, vterrors.Wrap(err, "bad keyspace data") } - + log.Infof("GetKeyspace:%v:%v:%v:", keyspace, version, k) return &KeyspaceInfo{ keyspace: keyspace, version: version, diff --git a/go/vt/topo/keyspace_workflow.go b/go/vt/topo/keyspace_workflow.go new file mode 100644 index 00000000000..d8b05cb7a1f --- /dev/null +++ b/go/vt/topo/keyspace_workflow.go @@ -0,0 +1,98 @@ +/* +Copyright 2023 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. +*/ + +package topo + +import ( + "context" + "fmt" + + "vitess.io/vitess/go/vt/proto/topodata" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" +) + +func (ts *Server) SaveWorkflowMetadata(ctx context.Context, targetKeyspace string, wm *topodata.WorkflowMetadata) (err error) { + ctx, unlock, lockErr := ts.LockKeyspace(ctx, targetKeyspace, "GetWorkflowMetadata") + if lockErr != nil { + err = lockErr + return err + } + defer unlock(&err) + + ki, err := ts.GetKeyspace(ctx, targetKeyspace) + for _, w := range ki.Workflows { + if w.Name == wm.Name { + return vterrors.New(vtrpc.Code_ALREADY_EXISTS, + fmt.Sprintf("workflow %s already exists in %s", w.Name, ki.KeyspaceName())) + } + } + ki.Workflows = append(ki.Workflows, &topodata.WorkflowMetadata{ + Name: wm.Name, + Type: wm.Type, + TargetShards: wm.TargetShards, + SourceKeyspace: wm.SourceKeyspace, + SourceShards: wm.SourceShards, + }) + if err := ts.UpdateKeyspace(ctx, ki); err != nil { + return err + } + return nil +} + +func (ts *Server) DeleteWorkflowMetadata(ctx context.Context, targetKeyspace, workflowName string) (err error) { + ctx, unlock, lockErr := ts.LockKeyspace(ctx, targetKeyspace, "GetWorkflowMetadata") + if lockErr != nil { + err = lockErr + return err + } + defer unlock(&err) + + ki, err := ts.GetKeyspace(ctx, targetKeyspace) + if err != nil { + return err + } + for i, w := range ki.Workflows { + if w.Name == workflowName { + ki.Workflows = append(ki.Workflows[:i], ki.Workflows[i+1:]...) + if err := ts.UpdateKeyspace(ctx, ki); err != nil { + return err + } + return nil + } + } + return nil +} + +func (ts *Server) GetWorkflowMetadata(ctx context.Context, targetKeyspace, workflowName string) (wm *topodata.WorkflowMetadata, err error) { + ctx, unlock, lockErr := ts.LockKeyspace(ctx, targetKeyspace, "GetWorkflowMetadata") + if lockErr != nil { + err = lockErr + return nil, err + } + defer unlock(&err) + + ki, err := ts.GetKeyspace(ctx, targetKeyspace) + if err != nil { + return nil, err + } + for _, w := range ki.Workflows { + if w.Name == workflowName { + return w, nil + } + } + return nil, nil +} diff --git a/go/vt/topo/workflow.go b/go/vt/topo/workflow.go deleted file mode 100644 index 54d4ecbbea1..00000000000 --- a/go/vt/topo/workflow.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2019 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. -*/ - -package topo - -import ( - "path" - - "context" - - workflowpb "vitess.io/vitess/go/vt/proto/workflow" -) - -// This file provides the utility methods to save / retrieve workflows -// in the topology global cell. - -const ( - workflowsPath = "workflows" - workflowFilename = "Workflow" -) - -func pathForWorkflow(uuid string) string { - return path.Join(workflowsPath, uuid, workflowFilename) -} - -// WorkflowInfo is a meta struct that contains the version of a Workflow. -type WorkflowInfo struct { - version Version - *workflowpb.Workflow -} - -// GetWorkflowNames returns the names of the existing -// workflows. They are sorted by uuid. -func (ts *Server) GetWorkflowNames(ctx context.Context) ([]string, error) { - entries, err := ts.globalCell.ListDir(ctx, workflowsPath, false /*full*/) - switch { - case IsErrType(err, NoNode): - return nil, nil - case err == nil: - return DirEntriesToStringArray(entries), nil - default: - return nil, err - } -} - -// CreateWorkflow creates the given workflow, and returns the initial -// WorkflowInfo. -func (ts *Server) CreateWorkflow(ctx context.Context, w *workflowpb.Workflow) (*WorkflowInfo, error) { - // Pack the content. - contents, err := w.MarshalVT() - if err != nil { - return nil, err - } - - // Save it. - filePath := pathForWorkflow(w.Uuid) - version, err := ts.globalCell.Create(ctx, filePath, contents) - if err != nil { - return nil, err - } - return &WorkflowInfo{ - version: version, - Workflow: w, - }, nil -} - -// GetWorkflow reads a workflow from the global cell. -func (ts *Server) GetWorkflow(ctx context.Context, uuid string) (*WorkflowInfo, error) { - // Read the file. - filePath := pathForWorkflow(uuid) - contents, version, err := ts.globalCell.Get(ctx, filePath) - if err != nil { - return nil, err - } - - // Unpack the contents. - w := &workflowpb.Workflow{} - if err := w.UnmarshalVT(contents); err != nil { - return nil, err - } - - return &WorkflowInfo{ - version: version, - Workflow: w, - }, nil -} - -// SaveWorkflow saves the WorkflowInfo object. If the version is not -// good any more, ErrBadVersion is returned. -func (ts *Server) SaveWorkflow(ctx context.Context, wi *WorkflowInfo) error { - // Pack the content. - contents, err := wi.Workflow.MarshalVT() - if err != nil { - return err - } - - // Save it. - filePath := pathForWorkflow(wi.Uuid) - version, err := ts.globalCell.Update(ctx, filePath, contents, wi.version) - if err != nil { - return err - } - - // Remember the new version. - wi.version = version - return nil -} - -// DeleteWorkflow deletes the specified workflow. After this, the -// WorkflowInfo object should not be used any more. -func (ts *Server) DeleteWorkflow(ctx context.Context, wi *WorkflowInfo) error { - filePath := pathForWorkflow(wi.Uuid) - return ts.globalCell.Delete(ctx, filePath, wi.version) -} diff --git a/go/vt/vtctl/workflow/utils.go b/go/vt/vtctl/workflow/utils.go index 1a723c6192c..b4c9616b4bc 100644 --- a/go/vt/vtctl/workflow/utils.go +++ b/go/vt/vtctl/workflow/utils.go @@ -647,6 +647,40 @@ func areTabletsAvailableToStreamFrom(ctx context.Context, req *vtctldatapb.Workf return nil } +func FilterShardsForWorkflow(ctx context.Context, ts *topo.Server, keyspace, workflow string, shards []string) ([]string, error) { + log.Infof("Filtering shards for workflow %s in keyspace %s", workflow, keyspace) + ks, err := ts.GetKeyspace(ctx, keyspace) + if ks.Keyspace == nil || err != nil { + return shards, nil // keyspace doesn't exist, so we can't filter shards, should only come here in tests. + } + wm, err := ts.GetWorkflowMetadata(ctx, keyspace, workflow) + if err != nil { + return nil, err + } + if wm == nil { + return shards, nil + } + + var targetShards []string + for _, shard := range shards { + for _, s := range wm.TargetShards { + if shard == s { + targetShards = append(targetShards, shard) + } + } + } + + if len(targetShards) != len(wm.TargetShards) { + return nil, fmt.Errorf("target shards %v for workflow %s does not match the shards in the metadata for keyspace %s", + wm.TargetShards, workflow, keyspace) + } + + if len(shards) != len(targetShards) { + log.Infof("workflow has fewer shards: %d than the keyspace: %d", len(targetShards), len(shards)) + } + return targetShards, nil +} + // LegacyBuildTargets collects MigrationTargets and other metadata (see TargetInfo) // from a workflow in the target keyspace. It uses VReplicationExec to get the workflow // details rather than the new TabletManager ReadVReplicationWorkflow RPC. This is @@ -658,7 +692,12 @@ func areTabletsAvailableToStreamFrom(ctx context.Context, req *vtctldatapb.Workf // // It returns ErrNoStreams if there are no targets found for the workflow. func LegacyBuildTargets(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, targetKeyspace string, workflow string) (*TargetInfo, error) { - targetShards, err := ts.GetShardNames(ctx, targetKeyspace) + shards, err := ts.GetShardNames(ctx, targetKeyspace) + if err != nil { + return nil, err + } + + targetShards, err := FilterShardsForWorkflow(ctx, ts, targetKeyspace, workflow, shards) if err != nil { return nil, err } @@ -687,6 +726,7 @@ func LegacyBuildTargets(ctx context.Context, ts *topo.Server, tmc tmclient.Table // two target shards will have vreplication streams, and the other shards in // the target keyspace will not. for _, targetShard := range targetShards { + log.Infof("Checking shard %s for workflow %s", targetShard, workflow) si, err := ts.GetShard(ctx, targetKeyspace, targetShard) if err != nil { return nil, err diff --git a/go/vt/wrangler/materializer.go b/go/vt/wrangler/materializer.go index 0fba424eacd..fbadf473cf5 100644 --- a/go/vt/wrangler/materializer.go +++ b/go/vt/wrangler/materializer.go @@ -27,6 +27,8 @@ import ( "text/template" "time" + "vitess.io/vitess/go/vt/proto/topodata" + "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/proto" @@ -136,7 +138,6 @@ func (wr *Wrangler) MoveTables(ctx context.Context, workflow, sourceKeyspace, ta //FIXME validate tableSpecs, allTables, excludeTables var tables []string var externalTopo *topo.Server - if externalCluster != "" { // when the source is an external mysql cluster mounted using the Mount command externalTopo, err = wr.ts.OpenExternalVitessClusterServer(ctx, externalCluster) if err != nil { @@ -359,6 +360,23 @@ func (wr *Wrangler) MoveTables(ctx context.Context, workflow, sourceKeyspace, ta return fmt.Errorf(msg) } } + var participatingShards []string + for _, si := range mz.targetShards { + participatingShards = append(participatingShards, si.ShardName()) + } + + wm := &topodata.WorkflowMetadata{ + Name: workflow, + Type: "MoveTables", + TargetShards: participatingShards, + SourceKeyspace: sourceKeyspace, + SourceShards: participatingShards, + } + log.Infof("Going to save workflow metadata for workflow %s: %+v", workflow, wm) + if err := wr.ts.SaveWorkflowMetadata(ctx, targetKeyspace, wm); err != nil { + return err + } + if autoStart { return mz.startStreams(ctx) } diff --git a/go/vt/wrangler/vexec.go b/go/vt/wrangler/vexec.go index 0734fa7b593..e15a1fadf76 100644 --- a/go/vt/wrangler/vexec.go +++ b/go/vt/wrangler/vexec.go @@ -220,6 +220,7 @@ func (vx *vexec) exec() (map[*topo.TabletInfo]*querypb.QueryResult, error) { wg.Add(1) go func(ctx context.Context, primary *topo.TabletInfo) { defer wg.Done() + log.Infof("Executing query on tablet %s", primary.AliasString()) qr, err := vx.planner.exec(ctx, primary.Alias, vx.plannedQuery) if err != nil { allErrors.RecordError(err) @@ -294,9 +295,15 @@ func (vx *vexec) getPrimaries() error { if len(shards) == 0 { return fmt.Errorf("no shards found in keyspace %s", vx.keyspace) } + + targetShards, err := workflow2.FilterShardsForWorkflow(vx.ctx, vx.wr.ts, vx.keyspace, vx.workflow, shards) + if err != nil { + return err + } + var allPrimaries []*topo.TabletInfo var primary *topo.TabletInfo - for _, shard := range shards { + for _, shard := range targetShards { if primary, err = vx.getPrimaryForShard(shard); err != nil { return err } diff --git a/proto/topodata.proto b/proto/topodata.proto index c921f72dfa4..8c9238324af 100644 --- a/proto/topodata.proto +++ b/proto/topodata.proto @@ -256,6 +256,14 @@ message Shard { reserved 5; } +message WorkflowMetadata { + string name = 1; + string type = 2; + repeated string target_shards = 4; + string source_keyspace = 5; + repeated string source_shards = 6; +} + // A Keyspace contains data about a keyspace. message Keyspace { // OBSOLETE string sharding_column_name = 1; @@ -312,6 +320,10 @@ message Keyspace { // used for various system metadata that is stored in each // tablet's mysqld instance. string sidecar_db_name = 10; + + // WorkflowMetadata is the metadata for workflows in this keyspace. + repeated WorkflowMetadata workflows = 11; + } // ShardReplication describes the MySQL replication relationships diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 048f1e11f0e..639c8608421 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -15087,6 +15087,127 @@ export namespace topodata { } } + /** Properties of a WorkflowMetadata. */ + interface IWorkflowMetadata { + + /** WorkflowMetadata name */ + name?: (string|null); + + /** WorkflowMetadata type */ + type?: (string|null); + + /** WorkflowMetadata target_shards */ + target_shards?: (string[]|null); + + /** WorkflowMetadata source_keyspace */ + source_keyspace?: (string|null); + + /** WorkflowMetadata source_shards */ + source_shards?: (string[]|null); + } + + /** Represents a WorkflowMetadata. */ + class WorkflowMetadata implements IWorkflowMetadata { + + /** + * Constructs a new WorkflowMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: topodata.IWorkflowMetadata); + + /** WorkflowMetadata name. */ + public name: string; + + /** WorkflowMetadata type. */ + public type: string; + + /** WorkflowMetadata target_shards. */ + public target_shards: string[]; + + /** WorkflowMetadata source_keyspace. */ + public source_keyspace: string; + + /** WorkflowMetadata source_shards. */ + public source_shards: string[]; + + /** + * Creates a new WorkflowMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkflowMetadata instance + */ + public static create(properties?: topodata.IWorkflowMetadata): topodata.WorkflowMetadata; + + /** + * Encodes the specified WorkflowMetadata message. Does not implicitly {@link topodata.WorkflowMetadata.verify|verify} messages. + * @param message WorkflowMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: topodata.IWorkflowMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkflowMetadata message, length delimited. Does not implicitly {@link topodata.WorkflowMetadata.verify|verify} messages. + * @param message WorkflowMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: topodata.IWorkflowMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkflowMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkflowMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.WorkflowMetadata; + + /** + * Decodes a WorkflowMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkflowMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.WorkflowMetadata; + + /** + * Verifies a WorkflowMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkflowMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkflowMetadata + */ + public static fromObject(object: { [k: string]: any }): topodata.WorkflowMetadata; + + /** + * Creates a plain object from a WorkflowMetadata message. Also converts values to other types if specified. + * @param message WorkflowMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: topodata.WorkflowMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkflowMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkflowMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Keyspace. */ interface IKeyspace { @@ -15110,6 +15231,9 @@ export namespace topodata { /** Keyspace sidecar_db_name */ sidecar_db_name?: (string|null); + + /** Keyspace workflows */ + workflows?: (topodata.IWorkflowMetadata[]|null); } /** Represents a Keyspace. */ @@ -15142,6 +15266,9 @@ export namespace topodata { /** Keyspace sidecar_db_name. */ public sidecar_db_name: string; + /** Keyspace workflows. */ + public workflows: topodata.IWorkflowMetadata[]; + /** * Creates a new Keyspace instance using the specified properties. * @param [properties] Properties to set diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 030a965d3a6..06879bc4aee 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -35022,6 +35022,336 @@ export const topodata = $root.topodata = (() => { return Shard; })(); + topodata.WorkflowMetadata = (function() { + + /** + * Properties of a WorkflowMetadata. + * @memberof topodata + * @interface IWorkflowMetadata + * @property {string|null} [name] WorkflowMetadata name + * @property {string|null} [type] WorkflowMetadata type + * @property {Array.|null} [target_shards] WorkflowMetadata target_shards + * @property {string|null} [source_keyspace] WorkflowMetadata source_keyspace + * @property {Array.|null} [source_shards] WorkflowMetadata source_shards + */ + + /** + * Constructs a new WorkflowMetadata. + * @memberof topodata + * @classdesc Represents a WorkflowMetadata. + * @implements IWorkflowMetadata + * @constructor + * @param {topodata.IWorkflowMetadata=} [properties] Properties to set + */ + function WorkflowMetadata(properties) { + this.target_shards = []; + this.source_shards = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkflowMetadata name. + * @member {string} name + * @memberof topodata.WorkflowMetadata + * @instance + */ + WorkflowMetadata.prototype.name = ""; + + /** + * WorkflowMetadata type. + * @member {string} type + * @memberof topodata.WorkflowMetadata + * @instance + */ + WorkflowMetadata.prototype.type = ""; + + /** + * WorkflowMetadata target_shards. + * @member {Array.} target_shards + * @memberof topodata.WorkflowMetadata + * @instance + */ + WorkflowMetadata.prototype.target_shards = $util.emptyArray; + + /** + * WorkflowMetadata source_keyspace. + * @member {string} source_keyspace + * @memberof topodata.WorkflowMetadata + * @instance + */ + WorkflowMetadata.prototype.source_keyspace = ""; + + /** + * WorkflowMetadata source_shards. + * @member {Array.} source_shards + * @memberof topodata.WorkflowMetadata + * @instance + */ + WorkflowMetadata.prototype.source_shards = $util.emptyArray; + + /** + * Creates a new WorkflowMetadata instance using the specified properties. + * @function create + * @memberof topodata.WorkflowMetadata + * @static + * @param {topodata.IWorkflowMetadata=} [properties] Properties to set + * @returns {topodata.WorkflowMetadata} WorkflowMetadata instance + */ + WorkflowMetadata.create = function create(properties) { + return new WorkflowMetadata(properties); + }; + + /** + * Encodes the specified WorkflowMetadata message. Does not implicitly {@link topodata.WorkflowMetadata.verify|verify} messages. + * @function encode + * @memberof topodata.WorkflowMetadata + * @static + * @param {topodata.IWorkflowMetadata} message WorkflowMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.target_shards != null && message.target_shards.length) + for (let i = 0; i < message.target_shards.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.target_shards[i]); + if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.source_keyspace); + if (message.source_shards != null && message.source_shards.length) + for (let i = 0; i < message.source_shards.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.source_shards[i]); + return writer; + }; + + /** + * Encodes the specified WorkflowMetadata message, length delimited. Does not implicitly {@link topodata.WorkflowMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof topodata.WorkflowMetadata + * @static + * @param {topodata.IWorkflowMetadata} message WorkflowMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkflowMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkflowMetadata message from the specified reader or buffer. + * @function decode + * @memberof topodata.WorkflowMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {topodata.WorkflowMetadata} WorkflowMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.WorkflowMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 4: { + if (!(message.target_shards && message.target_shards.length)) + message.target_shards = []; + message.target_shards.push(reader.string()); + break; + } + case 5: { + message.source_keyspace = reader.string(); + break; + } + case 6: { + if (!(message.source_shards && message.source_shards.length)) + message.source_shards = []; + message.source_shards.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkflowMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof topodata.WorkflowMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {topodata.WorkflowMetadata} WorkflowMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkflowMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkflowMetadata message. + * @function verify + * @memberof topodata.WorkflowMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkflowMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.target_shards != null && message.hasOwnProperty("target_shards")) { + if (!Array.isArray(message.target_shards)) + return "target_shards: array expected"; + for (let i = 0; i < message.target_shards.length; ++i) + if (!$util.isString(message.target_shards[i])) + return "target_shards: string[] expected"; + } + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + if (!$util.isString(message.source_keyspace)) + return "source_keyspace: string expected"; + if (message.source_shards != null && message.hasOwnProperty("source_shards")) { + if (!Array.isArray(message.source_shards)) + return "source_shards: array expected"; + for (let i = 0; i < message.source_shards.length; ++i) + if (!$util.isString(message.source_shards[i])) + return "source_shards: string[] expected"; + } + return null; + }; + + /** + * Creates a WorkflowMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof topodata.WorkflowMetadata + * @static + * @param {Object.} object Plain object + * @returns {topodata.WorkflowMetadata} WorkflowMetadata + */ + WorkflowMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.topodata.WorkflowMetadata) + return object; + let message = new $root.topodata.WorkflowMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.target_shards) { + if (!Array.isArray(object.target_shards)) + throw TypeError(".topodata.WorkflowMetadata.target_shards: array expected"); + message.target_shards = []; + for (let i = 0; i < object.target_shards.length; ++i) + message.target_shards[i] = String(object.target_shards[i]); + } + if (object.source_keyspace != null) + message.source_keyspace = String(object.source_keyspace); + if (object.source_shards) { + if (!Array.isArray(object.source_shards)) + throw TypeError(".topodata.WorkflowMetadata.source_shards: array expected"); + message.source_shards = []; + for (let i = 0; i < object.source_shards.length; ++i) + message.source_shards[i] = String(object.source_shards[i]); + } + return message; + }; + + /** + * Creates a plain object from a WorkflowMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof topodata.WorkflowMetadata + * @static + * @param {topodata.WorkflowMetadata} message WorkflowMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkflowMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.target_shards = []; + object.source_shards = []; + } + if (options.defaults) { + object.name = ""; + object.type = ""; + object.source_keyspace = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.target_shards && message.target_shards.length) { + object.target_shards = []; + for (let j = 0; j < message.target_shards.length; ++j) + object.target_shards[j] = message.target_shards[j]; + } + if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) + object.source_keyspace = message.source_keyspace; + if (message.source_shards && message.source_shards.length) { + object.source_shards = []; + for (let j = 0; j < message.source_shards.length; ++j) + object.source_shards[j] = message.source_shards[j]; + } + return object; + }; + + /** + * Converts this WorkflowMetadata to JSON. + * @function toJSON + * @memberof topodata.WorkflowMetadata + * @instance + * @returns {Object.} JSON object + */ + WorkflowMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkflowMetadata + * @function getTypeUrl + * @memberof topodata.WorkflowMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkflowMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/topodata.WorkflowMetadata"; + }; + + return WorkflowMetadata; + })(); + topodata.Keyspace = (function() { /** @@ -35035,6 +35365,7 @@ export const topodata = $root.topodata = (() => { * @property {string|null} [durability_policy] Keyspace durability_policy * @property {topodata.IThrottlerConfig|null} [throttler_config] Keyspace throttler_config * @property {string|null} [sidecar_db_name] Keyspace sidecar_db_name + * @property {Array.|null} [workflows] Keyspace workflows */ /** @@ -35047,6 +35378,7 @@ export const topodata = $root.topodata = (() => { */ function Keyspace(properties) { this.served_froms = []; + this.workflows = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35109,6 +35441,14 @@ export const topodata = $root.topodata = (() => { */ Keyspace.prototype.sidecar_db_name = ""; + /** + * Keyspace workflows. + * @member {Array.} workflows + * @memberof topodata.Keyspace + * @instance + */ + Keyspace.prototype.workflows = $util.emptyArray; + /** * Creates a new Keyspace instance using the specified properties. * @function create @@ -35148,6 +35488,9 @@ export const topodata = $root.topodata = (() => { $root.topodata.ThrottlerConfig.encode(message.throttler_config, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.sidecar_db_name != null && Object.hasOwnProperty.call(message, "sidecar_db_name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.sidecar_db_name); + if (message.workflows != null && message.workflows.length) + for (let i = 0; i < message.workflows.length; ++i) + $root.topodata.WorkflowMetadata.encode(message.workflows[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -35212,6 +35555,12 @@ export const topodata = $root.topodata = (() => { message.sidecar_db_name = reader.string(); break; } + case 11: { + if (!(message.workflows && message.workflows.length)) + message.workflows = []; + message.workflows.push($root.topodata.WorkflowMetadata.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -35283,6 +35632,15 @@ export const topodata = $root.topodata = (() => { if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) if (!$util.isString(message.sidecar_db_name)) return "sidecar_db_name: string expected"; + if (message.workflows != null && message.hasOwnProperty("workflows")) { + if (!Array.isArray(message.workflows)) + return "workflows: array expected"; + for (let i = 0; i < message.workflows.length; ++i) { + let error = $root.topodata.WorkflowMetadata.verify(message.workflows[i]); + if (error) + return "workflows." + error; + } + } return null; }; @@ -35340,6 +35698,16 @@ export const topodata = $root.topodata = (() => { } if (object.sidecar_db_name != null) message.sidecar_db_name = String(object.sidecar_db_name); + if (object.workflows) { + if (!Array.isArray(object.workflows)) + throw TypeError(".topodata.Keyspace.workflows: array expected"); + message.workflows = []; + for (let i = 0; i < object.workflows.length; ++i) { + if (typeof object.workflows[i] !== "object") + throw TypeError(".topodata.Keyspace.workflows: object expected"); + message.workflows[i] = $root.topodata.WorkflowMetadata.fromObject(object.workflows[i]); + } + } return message; }; @@ -35356,8 +35724,10 @@ export const topodata = $root.topodata = (() => { if (!options) options = {}; let object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.served_froms = []; + object.workflows = []; + } if (options.defaults) { object.keyspace_type = options.enums === String ? "NORMAL" : 0; object.base_keyspace = ""; @@ -35383,6 +35753,11 @@ export const topodata = $root.topodata = (() => { object.throttler_config = $root.topodata.ThrottlerConfig.toObject(message.throttler_config, options); if (message.sidecar_db_name != null && message.hasOwnProperty("sidecar_db_name")) object.sidecar_db_name = message.sidecar_db_name; + if (message.workflows && message.workflows.length) { + object.workflows = []; + for (let j = 0; j < message.workflows.length; ++j) + object.workflows[j] = $root.topodata.WorkflowMetadata.toObject(message.workflows[j], options); + } return object; };