diff --git a/go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go b/go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go index 82b13cf70b3..bd3f9117d18 100644 --- a/go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go +++ b/go/cmd/vtctldclient/command/vreplication/lookupvindex/lookupvindex.go @@ -18,12 +18,14 @@ package lookupvindex import ( "fmt" + "os" "strings" "github.com/spf13/cobra" "vitess.io/vitess/go/cmd/vtctldclient/cli" "vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common" + "vitess.io/vitess/go/json2" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vschemapb "vitess.io/vitess/go/vt/proto/vschema" @@ -68,6 +70,7 @@ var ( TabletTypesInPreferenceOrder bool IgnoreNulls bool ContinueAfterCopyWithOwner bool + ParamsFile string }{} externalizeOptions = struct { @@ -84,6 +87,30 @@ var ( }{} parseAndValidateCreate = func(cmd *cobra.Command, args []string) error { + if createOptions.ParamsFile != "" { + paramsFile, err := os.ReadFile(createOptions.ParamsFile) + if err != nil { + return err + } + createParams := &vtctldatapb.LookupVindexCreateParams{} + err = json2.UnmarshalPB(paramsFile, createParams) + if err != nil { + return err + } + return parseCreateParams(createParams) + } + if createOptions.Keyspace == "" { + return fmt.Errorf("keyspace is a required flag.") + } + if createOptions.TableOwner == "" { + return fmt.Errorf("table-owner is a required flag.") + } + if len(createOptions.TableOwnerColumns) == 0 { + return fmt.Errorf("table-owner-columns is a required flag.") + } + if createOptions.Keyspace == "" { + return fmt.Errorf("keyspace is a required flag.") + } if createOptions.TableName == "" { // Use vindex name createOptions.TableName = baseOptions.Name } @@ -139,6 +166,95 @@ var ( return nil } + parseCreateParams = func(params *vtctldatapb.LookupVindexCreateParams) error { + if params.Keyspace == "" { + return fmt.Errorf("keyspace cannot be empty") + } + createOptions.Keyspace = params.Keyspace + + if len(params.Vindexes) == 0 { + return fmt.Errorf("atleast 1 vindex is required") + } + + vindexes := map[string]*vschemapb.Vindex{} + tables := map[string]*vschemapb.Table{} + for _, vindex := range params.Vindexes { + if vindex.TableName == "" { + vindex.TableName = vindex.Name + } + + if !strings.Contains(vindex.LookupVindexType, "lookup") { + return fmt.Errorf("%s is not a lookup vindex type.", vindex.LookupVindexType) + } + + vindexes[vindex.Name] = &vschemapb.Vindex{ + Type: vindex.LookupVindexType, + Params: map[string]string{ + "table": baseOptions.TableKeyspace + "." + vindex.TableName, + "from": strings.Join(vindex.TableOwnerColumns, ","), + "to": "keyspace_id", + "ignore_nulls": fmt.Sprintf("%t", vindex.IgnoreNulls), + }, + Owner: vindex.TableOwner, + } + + targetTableColumnVindex := &vschemapb.ColumnVindex{ + // If the vindex name/type is empty then we'll fill this in + // later using the defult for the column types. + Name: vindex.TableVindexType, + Columns: vindex.TableOwnerColumns, + } + sourceTableColumnVindex := &vschemapb.ColumnVindex{ + Name: vindex.Name, + Columns: vindex.TableOwnerColumns, + } + + if table, ok := tables[vindex.TableName]; !ok { + tables[vindex.TableName] = &vschemapb.Table{ + ColumnVindexes: []*vschemapb.ColumnVindex{targetTableColumnVindex}, + } + } else { + table.ColumnVindexes = append(table.ColumnVindexes, targetTableColumnVindex) + } + + if table, ok := tables[vindex.TableOwner]; !ok { + tables[vindex.TableOwner] = &vschemapb.Table{ + ColumnVindexes: []*vschemapb.ColumnVindex{sourceTableColumnVindex}, + } + } else { + table.ColumnVindexes = append(table.ColumnVindexes, sourceTableColumnVindex) + } + } + + baseOptions.Vschema = &vschemapb.Keyspace{ + Vindexes: vindexes, + Tables: tables, + } + + // VReplication specific flags. + if len(params.TabletTypes) == 0 { + createOptions.TabletTypes = tabletTypesDefault + } else { + createOptions.TabletTypes = params.TabletTypes + } + + if len(params.Cells) != 0 { + for i, cell := range createOptions.Cells { + createOptions.Cells[i] = strings.TrimSpace(cell) + } + } + + if params.ContinueAfterCopyWithOwner != nil { + createOptions.ContinueAfterCopyWithOwner = *params.ContinueAfterCopyWithOwner + } + + if params.TabletTypesInPreferenceOrder != nil { + createOptions.ContinueAfterCopyWithOwner = *params.TabletTypesInPreferenceOrder + } + + return nil + } + // cancel makes a WorkflowDelete call to a vtctld. cancel = &cobra.Command{ Use: "cancel", @@ -166,7 +282,7 @@ var ( // create makes a LookupVindexCreate call to a vtctld. create = &cobra.Command{ Use: "create", - Short: "Create the Lookup Vindex in the specified keyspace and backfill it with a VReplication workflow.", + Short: "Create the Lookup Vindex(es) in the specified keyspace and backfill them with a VReplication workflow.", Example: `vtctldclient --server localhost:15999 LookupVindex --name corder_lookup_vdx --table-keyspace customer create --keyspace customer --type consistent_lookup_unique --table-owner corder --table-owner-columns sku --table-name corder_lookup_tbl --table-vindex-type unicode_loose_xxhash`, SilenceUsage: true, DisableFlagsInUseLine: true, @@ -359,7 +475,7 @@ func commandShow(cmd *cobra.Command, args []string) error { } func registerCommands(root *cobra.Command) { - base.PersistentFlags().StringVar(&baseOptions.Name, "name", "", "The name of the Lookup Vindex to create. This will also be the name of the VReplication workflow created to backfill the Lookup Vindex.") + base.PersistentFlags().StringVar(&baseOptions.Name, "name", "", "The name of the Lookup Vindex to create. This will also be the name of the VReplication workflow created to backfill the Lookup Vindex. This will be used only for the workflow name if params-file is used.") base.MarkPersistentFlagRequired("name") base.PersistentFlags().StringVar(&baseOptions.TableKeyspace, "table-keyspace", "", "The keyspace to create the lookup table in. This is also where the VReplication workflow is created to backfill the Lookup Vindex.") base.MarkPersistentFlagRequired("table-keyspace") @@ -368,17 +484,14 @@ func registerCommands(root *cobra.Command) { // This will create the lookup vindex in the specified keyspace // and setup a VReplication workflow to backfill its lookup table. create.Flags().StringVar(&createOptions.Keyspace, "keyspace", "", "The keyspace to create the Lookup Vindex in. This is also where the table-owner must exist.") - create.MarkFlagRequired("keyspace") create.Flags().StringVar(&createOptions.Type, "type", "", "The type of Lookup Vindex to create.") - create.MarkFlagRequired("type") create.Flags().StringVar(&createOptions.TableOwner, "table-owner", "", "The table holding the data which we should use to backfill the Lookup Vindex. This must exist in the same keyspace as the Lookup Vindex.") - create.MarkFlagRequired("table-owner") create.Flags().StringSliceVar(&createOptions.TableOwnerColumns, "table-owner-columns", nil, "The columns to read from the owner table. These will be used to build the hash which gets stored as the keyspace_id value in the lookup table.") - create.MarkFlagRequired("table-owner-columns") create.Flags().StringVar(&createOptions.TableName, "table-name", "", "The name of the lookup table. If not specified, then it will be created using the same name as the Lookup Vindex.") create.Flags().StringVar(&createOptions.TableVindexType, "table-vindex-type", "", "The primary vindex name/type to use for the lookup table, if the table-keyspace is sharded. If no value is provided then the default type will be used based on the table-owner-columns types.") create.Flags().BoolVar(&createOptions.IgnoreNulls, "ignore-nulls", false, "Do not add corresponding records in the lookup table if any of the owner table's 'from' fields are NULL.") create.Flags().BoolVar(&createOptions.ContinueAfterCopyWithOwner, "continue-after-copy-with-owner", true, "Vindex will continue materialization after the backfill completes when an owner is provided.") + create.Flags().StringVar(&createOptions.ParamsFile, "params-file", "", "JSON file containing lookup vindex create options. Use this for creating multiple lookup vindexes.") // VReplication specific flags. create.Flags().StringSliceVar(&createOptions.Cells, "cells", nil, "Cells to look in for source tablets to replicate from.") create.Flags().Var((*topoprotopb.TabletTypeListFlag)(&createOptions.TabletTypes), "tablet-types", "Source tablet types to replicate from.") diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 1ba227db405..e2061e3a3c5 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -16260,6 +16260,198 @@ func (x *WorkflowMirrorTrafficResponse) GetCurrentState() string { return "" } +type LookupVindexCreateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Keyspace to create the Lookup Vindex(es) in. + Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` + // Vindex(es) configuration. + Vindexes []*VindexParams `protobuf:"bytes,2,rep,name=vindexes,proto3" json:"vindexes,omitempty"` + // VReplication specific options. + Cells []string `protobuf:"bytes,3,rep,name=cells,proto3" json:"cells,omitempty"` + TabletTypes []topodata.TabletType `protobuf:"varint,4,rep,packed,name=tablet_types,json=tabletTypes,proto3,enum=topodata.TabletType" json:"tablet_types,omitempty"` + ContinueAfterCopyWithOwner *bool `protobuf:"varint,5,opt,name=continue_after_copy_with_owner,json=continueAfterCopyWithOwner,proto3,oneof" json:"continue_after_copy_with_owner,omitempty"` + TabletTypesInPreferenceOrder *bool `protobuf:"varint,6,opt,name=tablet_types_in_preference_order,json=tabletTypesInPreferenceOrder,proto3,oneof" json:"tablet_types_in_preference_order,omitempty"` +} + +func (x *LookupVindexCreateParams) Reset() { + *x = LookupVindexCreateParams{} + mi := &file_vtctldata_proto_msgTypes[266] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupVindexCreateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupVindexCreateParams) ProtoMessage() {} + +func (x *LookupVindexCreateParams) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[266] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupVindexCreateParams.ProtoReflect.Descriptor instead. +func (*LookupVindexCreateParams) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{266} +} + +func (x *LookupVindexCreateParams) GetKeyspace() string { + if x != nil { + return x.Keyspace + } + return "" +} + +func (x *LookupVindexCreateParams) GetVindexes() []*VindexParams { + if x != nil { + return x.Vindexes + } + return nil +} + +func (x *LookupVindexCreateParams) GetCells() []string { + if x != nil { + return x.Cells + } + return nil +} + +func (x *LookupVindexCreateParams) GetTabletTypes() []topodata.TabletType { + if x != nil { + return x.TabletTypes + } + return nil +} + +func (x *LookupVindexCreateParams) GetContinueAfterCopyWithOwner() bool { + if x != nil && x.ContinueAfterCopyWithOwner != nil { + return *x.ContinueAfterCopyWithOwner + } + return false +} + +func (x *LookupVindexCreateParams) GetTabletTypesInPreferenceOrder() bool { + if x != nil && x.TabletTypesInPreferenceOrder != nil { + return *x.TabletTypesInPreferenceOrder + } + return false +} + +type VindexParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the Lookup Vindex to create. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Type of Lookup Vindex to create. + LookupVindexType string `protobuf:"bytes,2,opt,name=lookup_vindex_type,json=lookupVindexType,proto3" json:"lookup_vindex_type,omitempty"` + // Table holding the data which we should use to backfill the Lookup Vindex. + // This must exist in the same keyspace as the Lookup Vindex. + TableOwner string `protobuf:"bytes,3,opt,name=table_owner,json=tableOwner,proto3" json:"table_owner,omitempty"` + // Columns to read from the owner table. + TableOwnerColumns []string `protobuf:"bytes,4,rep,name=table_owner_columns,json=tableOwnerColumns,proto3" json:"table_owner_columns,omitempty"` + // Name of the lookup table. If not specified, then it will be created using + // the same name as the Lookup Vindex. + TableName string `protobuf:"bytes,5,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + // Do not add corresponding records in the lookup table if any of the owner + // table's 'from' fields are NULL. + IgnoreNulls bool `protobuf:"varint,6,opt,name=ignore_nulls,json=ignoreNulls,proto3" json:"ignore_nulls,omitempty"` + // The primary vindex name/type to use for the lookup table, + // if the table-keyspace is sharded. + TableVindexType string `protobuf:"bytes,7,opt,name=table_vindex_type,json=tableVindexType,proto3" json:"table_vindex_type,omitempty"` +} + +func (x *VindexParams) Reset() { + *x = VindexParams{} + mi := &file_vtctldata_proto_msgTypes[267] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VindexParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VindexParams) ProtoMessage() {} + +func (x *VindexParams) ProtoReflect() protoreflect.Message { + mi := &file_vtctldata_proto_msgTypes[267] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VindexParams.ProtoReflect.Descriptor instead. +func (*VindexParams) Descriptor() ([]byte, []int) { + return file_vtctldata_proto_rawDescGZIP(), []int{267} +} + +func (x *VindexParams) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VindexParams) GetLookupVindexType() string { + if x != nil { + return x.LookupVindexType + } + return "" +} + +func (x *VindexParams) GetTableOwner() string { + if x != nil { + return x.TableOwner + } + return "" +} + +func (x *VindexParams) GetTableOwnerColumns() []string { + if x != nil { + return x.TableOwnerColumns + } + return nil +} + +func (x *VindexParams) GetTableName() string { + if x != nil { + return x.TableName + } + return "" +} + +func (x *VindexParams) GetIgnoreNulls() bool { + if x != nil { + return x.IgnoreNulls + } + return false +} + +func (x *VindexParams) GetTableVindexType() string { + if x != nil { + return x.TableVindexType + } + return "" +} + type Workflow_ReplicationLocation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -16271,7 +16463,7 @@ type Workflow_ReplicationLocation struct { func (x *Workflow_ReplicationLocation) Reset() { *x = Workflow_ReplicationLocation{} - mi := &file_vtctldata_proto_msgTypes[268] + mi := &file_vtctldata_proto_msgTypes[270] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16283,7 +16475,7 @@ func (x *Workflow_ReplicationLocation) String() string { func (*Workflow_ReplicationLocation) ProtoMessage() {} func (x *Workflow_ReplicationLocation) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[268] + mi := &file_vtctldata_proto_msgTypes[270] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16325,7 +16517,7 @@ type Workflow_ShardStream struct { func (x *Workflow_ShardStream) Reset() { *x = Workflow_ShardStream{} - mi := &file_vtctldata_proto_msgTypes[269] + mi := &file_vtctldata_proto_msgTypes[271] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16337,7 +16529,7 @@ func (x *Workflow_ShardStream) String() string { func (*Workflow_ShardStream) ProtoMessage() {} func (x *Workflow_ShardStream) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[269] + mi := &file_vtctldata_proto_msgTypes[271] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16411,7 +16603,7 @@ type Workflow_Stream struct { func (x *Workflow_Stream) Reset() { *x = Workflow_Stream{} - mi := &file_vtctldata_proto_msgTypes[270] + mi := &file_vtctldata_proto_msgTypes[272] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16423,7 +16615,7 @@ func (x *Workflow_Stream) String() string { func (*Workflow_Stream) ProtoMessage() {} func (x *Workflow_Stream) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[270] + mi := &file_vtctldata_proto_msgTypes[272] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16591,7 +16783,7 @@ type Workflow_Stream_CopyState struct { func (x *Workflow_Stream_CopyState) Reset() { *x = Workflow_Stream_CopyState{} - mi := &file_vtctldata_proto_msgTypes[271] + mi := &file_vtctldata_proto_msgTypes[273] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16603,7 +16795,7 @@ func (x *Workflow_Stream_CopyState) String() string { func (*Workflow_Stream_CopyState) ProtoMessage() {} func (x *Workflow_Stream_CopyState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[271] + mi := &file_vtctldata_proto_msgTypes[273] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16657,7 +16849,7 @@ type Workflow_Stream_Log struct { func (x *Workflow_Stream_Log) Reset() { *x = Workflow_Stream_Log{} - mi := &file_vtctldata_proto_msgTypes[272] + mi := &file_vtctldata_proto_msgTypes[274] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16669,7 +16861,7 @@ func (x *Workflow_Stream_Log) String() string { func (*Workflow_Stream_Log) ProtoMessage() {} func (x *Workflow_Stream_Log) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[272] + mi := &file_vtctldata_proto_msgTypes[274] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16752,7 +16944,7 @@ type Workflow_Stream_ThrottlerStatus struct { func (x *Workflow_Stream_ThrottlerStatus) Reset() { *x = Workflow_Stream_ThrottlerStatus{} - mi := &file_vtctldata_proto_msgTypes[273] + mi := &file_vtctldata_proto_msgTypes[275] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16764,7 +16956,7 @@ func (x *Workflow_Stream_ThrottlerStatus) String() string { func (*Workflow_Stream_ThrottlerStatus) ProtoMessage() {} func (x *Workflow_Stream_ThrottlerStatus) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[273] + mi := &file_vtctldata_proto_msgTypes[275] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16804,7 +16996,7 @@ type ApplyVSchemaResponse_ParamList struct { func (x *ApplyVSchemaResponse_ParamList) Reset() { *x = ApplyVSchemaResponse_ParamList{} - mi := &file_vtctldata_proto_msgTypes[276] + mi := &file_vtctldata_proto_msgTypes[278] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16816,7 +17008,7 @@ func (x *ApplyVSchemaResponse_ParamList) String() string { func (*ApplyVSchemaResponse_ParamList) ProtoMessage() {} func (x *ApplyVSchemaResponse_ParamList) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[276] + mi := &file_vtctldata_proto_msgTypes[278] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16849,7 +17041,7 @@ type GetSrvKeyspaceNamesResponse_NameList struct { func (x *GetSrvKeyspaceNamesResponse_NameList) Reset() { *x = GetSrvKeyspaceNamesResponse_NameList{} - mi := &file_vtctldata_proto_msgTypes[288] + mi := &file_vtctldata_proto_msgTypes[290] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16861,7 +17053,7 @@ func (x *GetSrvKeyspaceNamesResponse_NameList) String() string { func (*GetSrvKeyspaceNamesResponse_NameList) ProtoMessage() {} func (x *GetSrvKeyspaceNamesResponse_NameList) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[288] + mi := &file_vtctldata_proto_msgTypes[290] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16896,7 +17088,7 @@ type MoveTablesCreateResponse_TabletInfo struct { func (x *MoveTablesCreateResponse_TabletInfo) Reset() { *x = MoveTablesCreateResponse_TabletInfo{} - mi := &file_vtctldata_proto_msgTypes[292] + mi := &file_vtctldata_proto_msgTypes[294] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16908,7 +17100,7 @@ func (x *MoveTablesCreateResponse_TabletInfo) String() string { func (*MoveTablesCreateResponse_TabletInfo) ProtoMessage() {} func (x *MoveTablesCreateResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[292] + mi := &file_vtctldata_proto_msgTypes[294] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16950,7 +17142,7 @@ type WorkflowDeleteResponse_TabletInfo struct { func (x *WorkflowDeleteResponse_TabletInfo) Reset() { *x = WorkflowDeleteResponse_TabletInfo{} - mi := &file_vtctldata_proto_msgTypes[302] + mi := &file_vtctldata_proto_msgTypes[304] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16962,7 +17154,7 @@ func (x *WorkflowDeleteResponse_TabletInfo) String() string { func (*WorkflowDeleteResponse_TabletInfo) ProtoMessage() {} func (x *WorkflowDeleteResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[302] + mi := &file_vtctldata_proto_msgTypes[304] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17007,7 +17199,7 @@ type WorkflowStatusResponse_TableCopyState struct { func (x *WorkflowStatusResponse_TableCopyState) Reset() { *x = WorkflowStatusResponse_TableCopyState{} - mi := &file_vtctldata_proto_msgTypes[303] + mi := &file_vtctldata_proto_msgTypes[305] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17019,7 +17211,7 @@ func (x *WorkflowStatusResponse_TableCopyState) String() string { func (*WorkflowStatusResponse_TableCopyState) ProtoMessage() {} func (x *WorkflowStatusResponse_TableCopyState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[303] + mi := &file_vtctldata_proto_msgTypes[305] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17092,7 +17284,7 @@ type WorkflowStatusResponse_ShardStreamState struct { func (x *WorkflowStatusResponse_ShardStreamState) Reset() { *x = WorkflowStatusResponse_ShardStreamState{} - mi := &file_vtctldata_proto_msgTypes[304] + mi := &file_vtctldata_proto_msgTypes[306] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17104,7 +17296,7 @@ func (x *WorkflowStatusResponse_ShardStreamState) String() string { func (*WorkflowStatusResponse_ShardStreamState) ProtoMessage() {} func (x *WorkflowStatusResponse_ShardStreamState) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[304] + mi := &file_vtctldata_proto_msgTypes[306] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17172,7 +17364,7 @@ type WorkflowStatusResponse_ShardStreams struct { func (x *WorkflowStatusResponse_ShardStreams) Reset() { *x = WorkflowStatusResponse_ShardStreams{} - mi := &file_vtctldata_proto_msgTypes[305] + mi := &file_vtctldata_proto_msgTypes[307] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17184,7 +17376,7 @@ func (x *WorkflowStatusResponse_ShardStreams) String() string { func (*WorkflowStatusResponse_ShardStreams) ProtoMessage() {} func (x *WorkflowStatusResponse_ShardStreams) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[305] + mi := &file_vtctldata_proto_msgTypes[307] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17220,7 +17412,7 @@ type WorkflowUpdateResponse_TabletInfo struct { func (x *WorkflowUpdateResponse_TabletInfo) Reset() { *x = WorkflowUpdateResponse_TabletInfo{} - mi := &file_vtctldata_proto_msgTypes[308] + mi := &file_vtctldata_proto_msgTypes[310] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17232,7 +17424,7 @@ func (x *WorkflowUpdateResponse_TabletInfo) String() string { func (*WorkflowUpdateResponse_TabletInfo) ProtoMessage() {} func (x *WorkflowUpdateResponse_TabletInfo) ProtoReflect() protoreflect.Message { - mi := &file_vtctldata_proto_msgTypes[308] + mi := &file_vtctldata_proto_msgTypes[310] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19886,23 +20078,66 @@ var file_vtctldata_proto_rawDesc = []byte{ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, - 0x0a, 0x4d, 0x4f, 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, - 0x11, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, - 0x45, 0x58, 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x42, - 0x0a, 0x1c, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x09, - 0x0a, 0x05, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, - 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, - 0x10, 0x02, 0x42, 0x28, 0x5a, 0x26, 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, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x98, 0x03, 0x0a, 0x18, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x33, 0x0a, 0x08, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x76, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 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, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x77, 0x69, 0x74, + 0x68, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x70, 0x79, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x4b, + 0x0a, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x69, + 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x1c, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x21, 0x0a, 0x1f, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x70, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x23, + 0x0a, 0x21, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, + 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x22, 0x8f, 0x02, 0x0a, 0x0c, 0x56, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x5f, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x4e, 0x75, 0x6c, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x76, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x4a, 0x0a, 0x15, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0a, + 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, + 0x56, 0x45, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, + 0x02, 0x2a, 0x38, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, + 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, + 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x42, 0x0a, 0x1c, 0x53, + 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x4c, + 0x45, 0x41, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x42, + 0x28, 0x5a, 0x26, 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, + 0x76, 0x74, 0x63, 0x74, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -19918,7 +20153,7 @@ func file_vtctldata_proto_rawDescGZIP() []byte { } var file_vtctldata_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 309) +var file_vtctldata_proto_msgTypes = make([]protoimpl.MessageInfo, 311) var file_vtctldata_proto_goTypes = []any{ (MaterializationIntent)(0), // 0: vtctldata.MaterializationIntent (QueryOrdering)(0), // 1: vtctldata.QueryOrdering @@ -20191,339 +20426,343 @@ var file_vtctldata_proto_goTypes = []any{ (*GetMirrorRulesResponse)(nil), // 268: vtctldata.GetMirrorRulesResponse (*WorkflowMirrorTrafficRequest)(nil), // 269: vtctldata.WorkflowMirrorTrafficRequest (*WorkflowMirrorTrafficResponse)(nil), // 270: vtctldata.WorkflowMirrorTrafficResponse - nil, // 271: vtctldata.WorkflowOptions.ConfigEntry - nil, // 272: vtctldata.Workflow.ShardStreamsEntry - (*Workflow_ReplicationLocation)(nil), // 273: vtctldata.Workflow.ReplicationLocation - (*Workflow_ShardStream)(nil), // 274: vtctldata.Workflow.ShardStream - (*Workflow_Stream)(nil), // 275: vtctldata.Workflow.Stream - (*Workflow_Stream_CopyState)(nil), // 276: vtctldata.Workflow.Stream.CopyState - (*Workflow_Stream_Log)(nil), // 277: vtctldata.Workflow.Stream.Log - (*Workflow_Stream_ThrottlerStatus)(nil), // 278: vtctldata.Workflow.Stream.ThrottlerStatus - nil, // 279: vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry - nil, // 280: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry - (*ApplyVSchemaResponse_ParamList)(nil), // 281: vtctldata.ApplyVSchemaResponse.ParamList - nil, // 282: vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 283: vtctldata.ChangeTabletTagsRequest.TagsEntry - nil, // 284: vtctldata.ChangeTabletTagsResponse.BeforeTagsEntry - nil, // 285: vtctldata.ChangeTabletTagsResponse.AfterTagsEntry - nil, // 286: vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 287: vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 288: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - nil, // 289: vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 290: vtctldata.GetCellsAliasesResponse.AliasesEntry - nil, // 291: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry - nil, // 292: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 293: vtctldata.GetSrvKeyspaceNamesResponse.NameList - nil, // 294: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - nil, // 295: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - nil, // 296: vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry - (*MoveTablesCreateResponse_TabletInfo)(nil), // 297: vtctldata.MoveTablesCreateResponse.TabletInfo - nil, // 298: vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry - nil, // 299: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - nil, // 300: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - nil, // 301: vtctldata.ValidateResponse.ResultsByKeyspaceEntry - nil, // 302: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - nil, // 303: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - nil, // 304: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - nil, // 305: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - nil, // 306: vtctldata.VDiffShowResponse.TabletResponsesEntry - (*WorkflowDeleteResponse_TabletInfo)(nil), // 307: vtctldata.WorkflowDeleteResponse.TabletInfo - (*WorkflowStatusResponse_TableCopyState)(nil), // 308: vtctldata.WorkflowStatusResponse.TableCopyState - (*WorkflowStatusResponse_ShardStreamState)(nil), // 309: vtctldata.WorkflowStatusResponse.ShardStreamState - (*WorkflowStatusResponse_ShardStreams)(nil), // 310: vtctldata.WorkflowStatusResponse.ShardStreams - nil, // 311: vtctldata.WorkflowStatusResponse.TableCopyStateEntry - nil, // 312: vtctldata.WorkflowStatusResponse.ShardStreamsEntry - (*WorkflowUpdateResponse_TabletInfo)(nil), // 313: vtctldata.WorkflowUpdateResponse.TabletInfo - (*logutil.Event)(nil), // 314: logutil.Event - (tabletmanagerdata.TabletSelectionPreference)(0), // 315: tabletmanagerdata.TabletSelectionPreference - (*topodata.Keyspace)(nil), // 316: topodata.Keyspace - (*vttime.Time)(nil), // 317: vttime.Time - (*topodata.TabletAlias)(nil), // 318: topodata.TabletAlias - (*vttime.Duration)(nil), // 319: vttime.Duration - (*topodata.Shard)(nil), // 320: topodata.Shard - (*topodata.CellInfo)(nil), // 321: topodata.CellInfo - (*vschema.KeyspaceRoutingRules)(nil), // 322: vschema.KeyspaceRoutingRules - (*vschema.RoutingRules)(nil), // 323: vschema.RoutingRules - (*vschema.ShardRoutingRules)(nil), // 324: vschema.ShardRoutingRules - (*vtrpc.CallerID)(nil), // 325: vtrpc.CallerID - (*vschema.Keyspace)(nil), // 326: vschema.Keyspace - (topodata.TabletType)(0), // 327: topodata.TabletType - (*topodata.Tablet)(nil), // 328: topodata.Tablet - (*tabletmanagerdata.CheckThrottlerResponse)(nil), // 329: tabletmanagerdata.CheckThrottlerResponse - (topodata.KeyspaceType)(0), // 330: topodata.KeyspaceType - (*query.QueryResult)(nil), // 331: query.QueryResult - (*tabletmanagerdata.ExecuteHookRequest)(nil), // 332: tabletmanagerdata.ExecuteHookRequest - (*tabletmanagerdata.ExecuteHookResponse)(nil), // 333: tabletmanagerdata.ExecuteHookResponse - (*mysqlctl.BackupInfo)(nil), // 334: mysqlctl.BackupInfo - (*replicationdata.FullStatus)(nil), // 335: replicationdata.FullStatus - (*tabletmanagerdata.Permissions)(nil), // 336: tabletmanagerdata.Permissions - (*tabletmanagerdata.SchemaDefinition)(nil), // 337: tabletmanagerdata.SchemaDefinition - (*topodata.ThrottledAppRule)(nil), // 338: topodata.ThrottledAppRule - (*vschema.SrvVSchema)(nil), // 339: vschema.SrvVSchema - (*tabletmanagerdata.GetThrottlerStatusResponse)(nil), // 340: tabletmanagerdata.GetThrottlerStatusResponse - (*query.TransactionMetadata)(nil), // 341: query.TransactionMetadata - (*query.Target)(nil), // 342: query.Target - (*topodata.ShardReplicationError)(nil), // 343: topodata.ShardReplicationError - (*topodata.KeyRange)(nil), // 344: topodata.KeyRange - (*topodata.CellsAlias)(nil), // 345: topodata.CellsAlias - (*tabletmanagerdata.UpdateVReplicationWorkflowRequest)(nil), // 346: tabletmanagerdata.UpdateVReplicationWorkflowRequest - (*vschema.MirrorRules)(nil), // 347: vschema.MirrorRules - (*topodata.Shard_TabletControl)(nil), // 348: topodata.Shard.TabletControl - (*binlogdata.BinlogSource)(nil), // 349: binlogdata.BinlogSource - (*topodata.ShardReplication)(nil), // 350: topodata.ShardReplication - (*topodata.SrvKeyspace)(nil), // 351: topodata.SrvKeyspace - (*replicationdata.Status)(nil), // 352: replicationdata.Status - (*tabletmanagerdata.VDiffResponse)(nil), // 353: tabletmanagerdata.VDiffResponse + (*LookupVindexCreateParams)(nil), // 271: vtctldata.LookupVindexCreateParams + (*VindexParams)(nil), // 272: vtctldata.VindexParams + nil, // 273: vtctldata.WorkflowOptions.ConfigEntry + nil, // 274: vtctldata.Workflow.ShardStreamsEntry + (*Workflow_ReplicationLocation)(nil), // 275: vtctldata.Workflow.ReplicationLocation + (*Workflow_ShardStream)(nil), // 276: vtctldata.Workflow.ShardStream + (*Workflow_Stream)(nil), // 277: vtctldata.Workflow.Stream + (*Workflow_Stream_CopyState)(nil), // 278: vtctldata.Workflow.Stream.CopyState + (*Workflow_Stream_Log)(nil), // 279: vtctldata.Workflow.Stream.Log + (*Workflow_Stream_ThrottlerStatus)(nil), // 280: vtctldata.Workflow.Stream.ThrottlerStatus + nil, // 281: vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry + nil, // 282: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry + (*ApplyVSchemaResponse_ParamList)(nil), // 283: vtctldata.ApplyVSchemaResponse.ParamList + nil, // 284: vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 285: vtctldata.ChangeTabletTagsRequest.TagsEntry + nil, // 286: vtctldata.ChangeTabletTagsResponse.BeforeTagsEntry + nil, // 287: vtctldata.ChangeTabletTagsResponse.AfterTagsEntry + nil, // 288: vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 289: vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 290: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + nil, // 291: vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 292: vtctldata.GetCellsAliasesResponse.AliasesEntry + nil, // 293: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry + nil, // 294: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + (*GetSrvKeyspaceNamesResponse_NameList)(nil), // 295: vtctldata.GetSrvKeyspaceNamesResponse.NameList + nil, // 296: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + nil, // 297: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + nil, // 298: vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry + (*MoveTablesCreateResponse_TabletInfo)(nil), // 299: vtctldata.MoveTablesCreateResponse.TabletInfo + nil, // 300: vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry + nil, // 301: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + nil, // 302: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + nil, // 303: vtctldata.ValidateResponse.ResultsByKeyspaceEntry + nil, // 304: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + nil, // 305: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + nil, // 306: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + nil, // 307: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + nil, // 308: vtctldata.VDiffShowResponse.TabletResponsesEntry + (*WorkflowDeleteResponse_TabletInfo)(nil), // 309: vtctldata.WorkflowDeleteResponse.TabletInfo + (*WorkflowStatusResponse_TableCopyState)(nil), // 310: vtctldata.WorkflowStatusResponse.TableCopyState + (*WorkflowStatusResponse_ShardStreamState)(nil), // 311: vtctldata.WorkflowStatusResponse.ShardStreamState + (*WorkflowStatusResponse_ShardStreams)(nil), // 312: vtctldata.WorkflowStatusResponse.ShardStreams + nil, // 313: vtctldata.WorkflowStatusResponse.TableCopyStateEntry + nil, // 314: vtctldata.WorkflowStatusResponse.ShardStreamsEntry + (*WorkflowUpdateResponse_TabletInfo)(nil), // 315: vtctldata.WorkflowUpdateResponse.TabletInfo + (*logutil.Event)(nil), // 316: logutil.Event + (tabletmanagerdata.TabletSelectionPreference)(0), // 317: tabletmanagerdata.TabletSelectionPreference + (*topodata.Keyspace)(nil), // 318: topodata.Keyspace + (*vttime.Time)(nil), // 319: vttime.Time + (*topodata.TabletAlias)(nil), // 320: topodata.TabletAlias + (*vttime.Duration)(nil), // 321: vttime.Duration + (*topodata.Shard)(nil), // 322: topodata.Shard + (*topodata.CellInfo)(nil), // 323: topodata.CellInfo + (*vschema.KeyspaceRoutingRules)(nil), // 324: vschema.KeyspaceRoutingRules + (*vschema.RoutingRules)(nil), // 325: vschema.RoutingRules + (*vschema.ShardRoutingRules)(nil), // 326: vschema.ShardRoutingRules + (*vtrpc.CallerID)(nil), // 327: vtrpc.CallerID + (*vschema.Keyspace)(nil), // 328: vschema.Keyspace + (topodata.TabletType)(0), // 329: topodata.TabletType + (*topodata.Tablet)(nil), // 330: topodata.Tablet + (*tabletmanagerdata.CheckThrottlerResponse)(nil), // 331: tabletmanagerdata.CheckThrottlerResponse + (topodata.KeyspaceType)(0), // 332: topodata.KeyspaceType + (*query.QueryResult)(nil), // 333: query.QueryResult + (*tabletmanagerdata.ExecuteHookRequest)(nil), // 334: tabletmanagerdata.ExecuteHookRequest + (*tabletmanagerdata.ExecuteHookResponse)(nil), // 335: tabletmanagerdata.ExecuteHookResponse + (*mysqlctl.BackupInfo)(nil), // 336: mysqlctl.BackupInfo + (*replicationdata.FullStatus)(nil), // 337: replicationdata.FullStatus + (*tabletmanagerdata.Permissions)(nil), // 338: tabletmanagerdata.Permissions + (*tabletmanagerdata.SchemaDefinition)(nil), // 339: tabletmanagerdata.SchemaDefinition + (*topodata.ThrottledAppRule)(nil), // 340: topodata.ThrottledAppRule + (*vschema.SrvVSchema)(nil), // 341: vschema.SrvVSchema + (*tabletmanagerdata.GetThrottlerStatusResponse)(nil), // 342: tabletmanagerdata.GetThrottlerStatusResponse + (*query.TransactionMetadata)(nil), // 343: query.TransactionMetadata + (*query.Target)(nil), // 344: query.Target + (*topodata.ShardReplicationError)(nil), // 345: topodata.ShardReplicationError + (*topodata.KeyRange)(nil), // 346: topodata.KeyRange + (*topodata.CellsAlias)(nil), // 347: topodata.CellsAlias + (*tabletmanagerdata.UpdateVReplicationWorkflowRequest)(nil), // 348: tabletmanagerdata.UpdateVReplicationWorkflowRequest + (*vschema.MirrorRules)(nil), // 349: vschema.MirrorRules + (*topodata.Shard_TabletControl)(nil), // 350: topodata.Shard.TabletControl + (*binlogdata.BinlogSource)(nil), // 351: binlogdata.BinlogSource + (*topodata.ShardReplication)(nil), // 352: topodata.ShardReplication + (*topodata.SrvKeyspace)(nil), // 353: topodata.SrvKeyspace + (*replicationdata.Status)(nil), // 354: replicationdata.Status + (*tabletmanagerdata.VDiffResponse)(nil), // 355: tabletmanagerdata.VDiffResponse } var file_vtctldata_proto_depIdxs = []int32{ - 314, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event + 316, // 0: vtctldata.ExecuteVtctlCommandResponse.event:type_name -> logutil.Event 7, // 1: vtctldata.MaterializeSettings.table_settings:type_name -> vtctldata.TableMaterializeSettings 0, // 2: vtctldata.MaterializeSettings.materialization_intent:type_name -> vtctldata.MaterializationIntent - 315, // 3: vtctldata.MaterializeSettings.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 317, // 3: vtctldata.MaterializeSettings.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 12, // 4: vtctldata.MaterializeSettings.workflow_options:type_name -> vtctldata.WorkflowOptions - 316, // 5: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace + 318, // 5: vtctldata.Keyspace.keyspace:type_name -> topodata.Keyspace 3, // 6: vtctldata.SchemaMigration.strategy:type_name -> vtctldata.SchemaMigration.Strategy - 317, // 7: vtctldata.SchemaMigration.added_at:type_name -> vttime.Time - 317, // 8: vtctldata.SchemaMigration.requested_at:type_name -> vttime.Time - 317, // 9: vtctldata.SchemaMigration.ready_at:type_name -> vttime.Time - 317, // 10: vtctldata.SchemaMigration.started_at:type_name -> vttime.Time - 317, // 11: vtctldata.SchemaMigration.liveness_timestamp:type_name -> vttime.Time - 317, // 12: vtctldata.SchemaMigration.completed_at:type_name -> vttime.Time - 317, // 13: vtctldata.SchemaMigration.cleaned_up_at:type_name -> vttime.Time + 319, // 7: vtctldata.SchemaMigration.added_at:type_name -> vttime.Time + 319, // 8: vtctldata.SchemaMigration.requested_at:type_name -> vttime.Time + 319, // 9: vtctldata.SchemaMigration.ready_at:type_name -> vttime.Time + 319, // 10: vtctldata.SchemaMigration.started_at:type_name -> vttime.Time + 319, // 11: vtctldata.SchemaMigration.liveness_timestamp:type_name -> vttime.Time + 319, // 12: vtctldata.SchemaMigration.completed_at:type_name -> vttime.Time + 319, // 13: vtctldata.SchemaMigration.cleaned_up_at:type_name -> vttime.Time 4, // 14: vtctldata.SchemaMigration.status:type_name -> vtctldata.SchemaMigration.Status - 318, // 15: vtctldata.SchemaMigration.tablet:type_name -> topodata.TabletAlias - 319, // 16: vtctldata.SchemaMigration.artifact_retention:type_name -> vttime.Duration - 317, // 17: vtctldata.SchemaMigration.last_throttled_at:type_name -> vttime.Time - 317, // 18: vtctldata.SchemaMigration.cancelled_at:type_name -> vttime.Time - 317, // 19: vtctldata.SchemaMigration.reviewed_at:type_name -> vttime.Time - 317, // 20: vtctldata.SchemaMigration.ready_to_complete_at:type_name -> vttime.Time - 320, // 21: vtctldata.Shard.shard:type_name -> topodata.Shard + 320, // 15: vtctldata.SchemaMigration.tablet:type_name -> topodata.TabletAlias + 321, // 16: vtctldata.SchemaMigration.artifact_retention:type_name -> vttime.Duration + 319, // 17: vtctldata.SchemaMigration.last_throttled_at:type_name -> vttime.Time + 319, // 18: vtctldata.SchemaMigration.cancelled_at:type_name -> vttime.Time + 319, // 19: vtctldata.SchemaMigration.reviewed_at:type_name -> vttime.Time + 319, // 20: vtctldata.SchemaMigration.ready_to_complete_at:type_name -> vttime.Time + 322, // 21: vtctldata.Shard.shard:type_name -> topodata.Shard 2, // 22: vtctldata.WorkflowOptions.sharded_auto_increment_handling:type_name -> vtctldata.ShardedAutoIncrementHandling - 271, // 23: vtctldata.WorkflowOptions.config:type_name -> vtctldata.WorkflowOptions.ConfigEntry - 273, // 24: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation - 273, // 25: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation - 272, // 26: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry + 273, // 23: vtctldata.WorkflowOptions.config:type_name -> vtctldata.WorkflowOptions.ConfigEntry + 275, // 24: vtctldata.Workflow.source:type_name -> vtctldata.Workflow.ReplicationLocation + 275, // 25: vtctldata.Workflow.target:type_name -> vtctldata.Workflow.ReplicationLocation + 274, // 26: vtctldata.Workflow.shard_streams:type_name -> vtctldata.Workflow.ShardStreamsEntry 12, // 27: vtctldata.Workflow.options:type_name -> vtctldata.WorkflowOptions - 321, // 28: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 322, // 29: vtctldata.ApplyKeyspaceRoutingRulesRequest.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 322, // 30: vtctldata.ApplyKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 323, // 31: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules - 324, // 32: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 319, // 33: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration - 325, // 34: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID - 279, // 35: vtctldata.ApplySchemaResponse.rows_affected_by_shard:type_name -> vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry - 326, // 36: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace - 326, // 37: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace - 280, // 38: vtctldata.ApplyVSchemaResponse.unknown_vindex_params:type_name -> vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry - 318, // 39: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 40: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 314, // 41: vtctldata.BackupResponse.event:type_name -> logutil.Event - 282, // 42: vtctldata.CancelSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry - 318, // 43: vtctldata.ChangeTabletTagsRequest.tablet_alias:type_name -> topodata.TabletAlias - 283, // 44: vtctldata.ChangeTabletTagsRequest.tags:type_name -> vtctldata.ChangeTabletTagsRequest.TagsEntry - 284, // 45: vtctldata.ChangeTabletTagsResponse.before_tags:type_name -> vtctldata.ChangeTabletTagsResponse.BeforeTagsEntry - 285, // 46: vtctldata.ChangeTabletTagsResponse.after_tags:type_name -> vtctldata.ChangeTabletTagsResponse.AfterTagsEntry - 318, // 47: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias - 327, // 48: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType - 328, // 49: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet - 328, // 50: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet - 318, // 51: vtctldata.CheckThrottlerRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 52: vtctldata.CheckThrottlerResponse.tablet_alias:type_name -> topodata.TabletAlias - 329, // 53: vtctldata.CheckThrottlerResponse.Check:type_name -> tabletmanagerdata.CheckThrottlerResponse - 286, // 54: vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry - 287, // 55: vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry - 318, // 56: vtctldata.CopySchemaShardRequest.source_tablet_alias:type_name -> topodata.TabletAlias - 319, // 57: vtctldata.CopySchemaShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 330, // 58: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType - 317, // 59: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time + 323, // 28: vtctldata.AddCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 324, // 29: vtctldata.ApplyKeyspaceRoutingRulesRequest.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 324, // 30: vtctldata.ApplyKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 325, // 31: vtctldata.ApplyRoutingRulesRequest.routing_rules:type_name -> vschema.RoutingRules + 326, // 32: vtctldata.ApplyShardRoutingRulesRequest.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 321, // 33: vtctldata.ApplySchemaRequest.wait_replicas_timeout:type_name -> vttime.Duration + 327, // 34: vtctldata.ApplySchemaRequest.caller_id:type_name -> vtrpc.CallerID + 281, // 35: vtctldata.ApplySchemaResponse.rows_affected_by_shard:type_name -> vtctldata.ApplySchemaResponse.RowsAffectedByShardEntry + 328, // 36: vtctldata.ApplyVSchemaRequest.v_schema:type_name -> vschema.Keyspace + 328, // 37: vtctldata.ApplyVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 282, // 38: vtctldata.ApplyVSchemaResponse.unknown_vindex_params:type_name -> vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry + 320, // 39: vtctldata.BackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 40: vtctldata.BackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 316, // 41: vtctldata.BackupResponse.event:type_name -> logutil.Event + 284, // 42: vtctldata.CancelSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CancelSchemaMigrationResponse.RowsAffectedByShardEntry + 320, // 43: vtctldata.ChangeTabletTagsRequest.tablet_alias:type_name -> topodata.TabletAlias + 285, // 44: vtctldata.ChangeTabletTagsRequest.tags:type_name -> vtctldata.ChangeTabletTagsRequest.TagsEntry + 286, // 45: vtctldata.ChangeTabletTagsResponse.before_tags:type_name -> vtctldata.ChangeTabletTagsResponse.BeforeTagsEntry + 287, // 46: vtctldata.ChangeTabletTagsResponse.after_tags:type_name -> vtctldata.ChangeTabletTagsResponse.AfterTagsEntry + 320, // 47: vtctldata.ChangeTabletTypeRequest.tablet_alias:type_name -> topodata.TabletAlias + 329, // 48: vtctldata.ChangeTabletTypeRequest.db_type:type_name -> topodata.TabletType + 330, // 49: vtctldata.ChangeTabletTypeResponse.before_tablet:type_name -> topodata.Tablet + 330, // 50: vtctldata.ChangeTabletTypeResponse.after_tablet:type_name -> topodata.Tablet + 320, // 51: vtctldata.CheckThrottlerRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 52: vtctldata.CheckThrottlerResponse.tablet_alias:type_name -> topodata.TabletAlias + 331, // 53: vtctldata.CheckThrottlerResponse.Check:type_name -> tabletmanagerdata.CheckThrottlerResponse + 288, // 54: vtctldata.CleanupSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CleanupSchemaMigrationResponse.RowsAffectedByShardEntry + 289, // 55: vtctldata.CompleteSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.CompleteSchemaMigrationResponse.RowsAffectedByShardEntry + 320, // 56: vtctldata.CopySchemaShardRequest.source_tablet_alias:type_name -> topodata.TabletAlias + 321, // 57: vtctldata.CopySchemaShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 332, // 58: vtctldata.CreateKeyspaceRequest.type:type_name -> topodata.KeyspaceType + 319, // 59: vtctldata.CreateKeyspaceRequest.snapshot_time:type_name -> vttime.Time 9, // 60: vtctldata.CreateKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace 9, // 61: vtctldata.CreateShardResponse.keyspace:type_name -> vtctldata.Keyspace 11, // 62: vtctldata.CreateShardResponse.shard:type_name -> vtctldata.Shard 11, // 63: vtctldata.DeleteShardsRequest.shards:type_name -> vtctldata.Shard - 318, // 64: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 318, // 65: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 318, // 66: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias - 319, // 67: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 318, // 68: vtctldata.EmergencyReparentShardRequest.expected_primary:type_name -> topodata.TabletAlias - 318, // 69: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 314, // 70: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event - 318, // 71: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias - 331, // 72: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult - 318, // 73: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 331, // 74: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult - 318, // 75: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias - 332, // 76: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest - 333, // 77: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse - 318, // 78: vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias - 331, // 79: vtctldata.ExecuteMultiFetchAsDBAResponse.results:type_name -> query.QueryResult - 288, // 80: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry - 289, // 81: vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry - 334, // 82: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo - 321, // 83: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 290, // 84: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry - 318, // 85: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 335, // 86: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus + 320, // 64: vtctldata.DeleteTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 320, // 65: vtctldata.EmergencyReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 320, // 66: vtctldata.EmergencyReparentShardRequest.ignore_replicas:type_name -> topodata.TabletAlias + 321, // 67: vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 320, // 68: vtctldata.EmergencyReparentShardRequest.expected_primary:type_name -> topodata.TabletAlias + 320, // 69: vtctldata.EmergencyReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 316, // 70: vtctldata.EmergencyReparentShardResponse.events:type_name -> logutil.Event + 320, // 71: vtctldata.ExecuteFetchAsAppRequest.tablet_alias:type_name -> topodata.TabletAlias + 333, // 72: vtctldata.ExecuteFetchAsAppResponse.result:type_name -> query.QueryResult + 320, // 73: vtctldata.ExecuteFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 333, // 74: vtctldata.ExecuteFetchAsDBAResponse.result:type_name -> query.QueryResult + 320, // 75: vtctldata.ExecuteHookRequest.tablet_alias:type_name -> topodata.TabletAlias + 334, // 76: vtctldata.ExecuteHookRequest.tablet_hook_request:type_name -> tabletmanagerdata.ExecuteHookRequest + 335, // 77: vtctldata.ExecuteHookResponse.hook_result:type_name -> tabletmanagerdata.ExecuteHookResponse + 320, // 78: vtctldata.ExecuteMultiFetchAsDBARequest.tablet_alias:type_name -> topodata.TabletAlias + 333, // 79: vtctldata.ExecuteMultiFetchAsDBAResponse.results:type_name -> query.QueryResult + 290, // 80: vtctldata.FindAllShardsInKeyspaceResponse.shards:type_name -> vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry + 291, // 81: vtctldata.ForceCutOverSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.ForceCutOverSchemaMigrationResponse.RowsAffectedByShardEntry + 336, // 82: vtctldata.GetBackupsResponse.backups:type_name -> mysqlctl.BackupInfo + 323, // 83: vtctldata.GetCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 292, // 84: vtctldata.GetCellsAliasesResponse.aliases:type_name -> vtctldata.GetCellsAliasesResponse.AliasesEntry + 320, // 85: vtctldata.GetFullStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 337, // 86: vtctldata.GetFullStatusResponse.status:type_name -> replicationdata.FullStatus 9, // 87: vtctldata.GetKeyspacesResponse.keyspaces:type_name -> vtctldata.Keyspace 9, // 88: vtctldata.GetKeyspaceResponse.keyspace:type_name -> vtctldata.Keyspace - 318, // 89: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias - 336, // 90: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions - 322, // 91: vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules - 323, // 92: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules - 318, // 93: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 337, // 94: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition + 320, // 89: vtctldata.GetPermissionsRequest.tablet_alias:type_name -> topodata.TabletAlias + 338, // 90: vtctldata.GetPermissionsResponse.permissions:type_name -> tabletmanagerdata.Permissions + 324, // 91: vtctldata.GetKeyspaceRoutingRulesResponse.keyspace_routing_rules:type_name -> vschema.KeyspaceRoutingRules + 325, // 92: vtctldata.GetRoutingRulesResponse.routing_rules:type_name -> vschema.RoutingRules + 320, // 93: vtctldata.GetSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 339, // 94: vtctldata.GetSchemaResponse.schema:type_name -> tabletmanagerdata.SchemaDefinition 4, // 95: vtctldata.GetSchemaMigrationsRequest.status:type_name -> vtctldata.SchemaMigration.Status - 319, // 96: vtctldata.GetSchemaMigrationsRequest.recent:type_name -> vttime.Duration + 321, // 96: vtctldata.GetSchemaMigrationsRequest.recent:type_name -> vttime.Duration 1, // 97: vtctldata.GetSchemaMigrationsRequest.order:type_name -> vtctldata.QueryOrdering 10, // 98: vtctldata.GetSchemaMigrationsResponse.migrations:type_name -> vtctldata.SchemaMigration - 291, // 99: vtctldata.GetShardReplicationResponse.shard_replication_by_cell:type_name -> vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry + 293, // 99: vtctldata.GetShardReplicationResponse.shard_replication_by_cell:type_name -> vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry 11, // 100: vtctldata.GetShardResponse.shard:type_name -> vtctldata.Shard - 324, // 101: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules - 292, // 102: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry - 294, // 103: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry - 338, // 104: vtctldata.UpdateThrottlerConfigRequest.throttled_app:type_name -> topodata.ThrottledAppRule - 339, // 105: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema - 295, // 106: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry - 318, // 107: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 328, // 108: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet - 318, // 109: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias - 327, // 110: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType - 328, // 111: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet - 318, // 112: vtctldata.GetThrottlerStatusRequest.tablet_alias:type_name -> topodata.TabletAlias - 340, // 113: vtctldata.GetThrottlerStatusResponse.status:type_name -> tabletmanagerdata.GetThrottlerStatusResponse + 326, // 101: vtctldata.GetShardRoutingRulesResponse.shard_routing_rules:type_name -> vschema.ShardRoutingRules + 294, // 102: vtctldata.GetSrvKeyspaceNamesResponse.names:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry + 296, // 103: vtctldata.GetSrvKeyspacesResponse.srv_keyspaces:type_name -> vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry + 340, // 104: vtctldata.UpdateThrottlerConfigRequest.throttled_app:type_name -> topodata.ThrottledAppRule + 341, // 105: vtctldata.GetSrvVSchemaResponse.srv_v_schema:type_name -> vschema.SrvVSchema + 297, // 106: vtctldata.GetSrvVSchemasResponse.srv_v_schemas:type_name -> vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry + 320, // 107: vtctldata.GetTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 330, // 108: vtctldata.GetTabletResponse.tablet:type_name -> topodata.Tablet + 320, // 109: vtctldata.GetTabletsRequest.tablet_aliases:type_name -> topodata.TabletAlias + 329, // 110: vtctldata.GetTabletsRequest.tablet_type:type_name -> topodata.TabletType + 330, // 111: vtctldata.GetTabletsResponse.tablets:type_name -> topodata.Tablet + 320, // 112: vtctldata.GetThrottlerStatusRequest.tablet_alias:type_name -> topodata.TabletAlias + 342, // 113: vtctldata.GetThrottlerStatusResponse.status:type_name -> tabletmanagerdata.GetThrottlerStatusResponse 123, // 114: vtctldata.GetTopologyPathResponse.cell:type_name -> vtctldata.TopologyCell - 341, // 115: vtctldata.GetUnresolvedTransactionsResponse.transactions:type_name -> query.TransactionMetadata - 341, // 116: vtctldata.GetTransactionInfoResponse.metadata:type_name -> query.TransactionMetadata + 343, // 115: vtctldata.GetUnresolvedTransactionsResponse.transactions:type_name -> query.TransactionMetadata + 343, // 116: vtctldata.GetTransactionInfoResponse.metadata:type_name -> query.TransactionMetadata 127, // 117: vtctldata.GetTransactionInfoResponse.shard_states:type_name -> vtctldata.ShardTransactionState - 342, // 118: vtctldata.ConcludeTransactionRequest.participants:type_name -> query.Target - 318, // 119: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias - 326, // 120: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace + 344, // 118: vtctldata.ConcludeTransactionRequest.participants:type_name -> query.Target + 320, // 119: vtctldata.GetVersionRequest.tablet_alias:type_name -> topodata.TabletAlias + 328, // 120: vtctldata.GetVSchemaResponse.v_schema:type_name -> vschema.Keyspace 13, // 121: vtctldata.GetWorkflowsResponse.workflows:type_name -> vtctldata.Workflow - 318, // 122: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias - 319, // 123: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration - 314, // 124: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event - 296, // 125: vtctldata.LaunchSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry - 326, // 126: vtctldata.LookupVindexCreateRequest.vindex:type_name -> vschema.Keyspace - 327, // 127: vtctldata.LookupVindexCreateRequest.tablet_types:type_name -> topodata.TabletType - 315, // 128: vtctldata.LookupVindexCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 320, // 122: vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias:type_name -> topodata.TabletAlias + 321, // 123: vtctldata.InitShardPrimaryRequest.wait_replicas_timeout:type_name -> vttime.Duration + 316, // 124: vtctldata.InitShardPrimaryResponse.events:type_name -> logutil.Event + 298, // 125: vtctldata.LaunchSchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.LaunchSchemaMigrationResponse.RowsAffectedByShardEntry + 328, // 126: vtctldata.LookupVindexCreateRequest.vindex:type_name -> vschema.Keyspace + 329, // 127: vtctldata.LookupVindexCreateRequest.tablet_types:type_name -> topodata.TabletType + 317, // 128: vtctldata.LookupVindexCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 8, // 129: vtctldata.MaterializeCreateRequest.settings:type_name -> vtctldata.MaterializeSettings - 327, // 130: vtctldata.MigrateCreateRequest.tablet_types:type_name -> topodata.TabletType - 315, // 131: vtctldata.MigrateCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 327, // 132: vtctldata.MoveTablesCreateRequest.tablet_types:type_name -> topodata.TabletType - 315, // 133: vtctldata.MoveTablesCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 329, // 130: vtctldata.MigrateCreateRequest.tablet_types:type_name -> topodata.TabletType + 317, // 131: vtctldata.MigrateCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 329, // 132: vtctldata.MoveTablesCreateRequest.tablet_types:type_name -> topodata.TabletType + 317, // 133: vtctldata.MoveTablesCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 12, // 134: vtctldata.MoveTablesCreateRequest.workflow_options:type_name -> vtctldata.WorkflowOptions - 297, // 135: vtctldata.MoveTablesCreateResponse.details:type_name -> vtctldata.MoveTablesCreateResponse.TabletInfo - 318, // 136: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 137: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias - 318, // 138: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias - 319, // 139: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration - 319, // 140: vtctldata.PlannedReparentShardRequest.tolerable_replication_lag:type_name -> vttime.Duration - 318, // 141: vtctldata.PlannedReparentShardRequest.expected_primary:type_name -> topodata.TabletAlias - 318, // 142: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias - 314, // 143: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event - 318, // 144: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 145: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias - 314, // 146: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event - 314, // 147: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event - 318, // 148: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias - 318, // 149: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias - 327, // 150: vtctldata.ReshardCreateRequest.tablet_types:type_name -> topodata.TabletType - 315, // 151: vtctldata.ReshardCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 299, // 135: vtctldata.MoveTablesCreateResponse.details:type_name -> vtctldata.MoveTablesCreateResponse.TabletInfo + 320, // 136: vtctldata.PingTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 137: vtctldata.PlannedReparentShardRequest.new_primary:type_name -> topodata.TabletAlias + 320, // 138: vtctldata.PlannedReparentShardRequest.avoid_primary:type_name -> topodata.TabletAlias + 321, // 139: vtctldata.PlannedReparentShardRequest.wait_replicas_timeout:type_name -> vttime.Duration + 321, // 140: vtctldata.PlannedReparentShardRequest.tolerable_replication_lag:type_name -> vttime.Duration + 320, // 141: vtctldata.PlannedReparentShardRequest.expected_primary:type_name -> topodata.TabletAlias + 320, // 142: vtctldata.PlannedReparentShardResponse.promoted_primary:type_name -> topodata.TabletAlias + 316, // 143: vtctldata.PlannedReparentShardResponse.events:type_name -> logutil.Event + 320, // 144: vtctldata.RefreshStateRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 145: vtctldata.ReloadSchemaRequest.tablet_alias:type_name -> topodata.TabletAlias + 316, // 146: vtctldata.ReloadSchemaKeyspaceResponse.events:type_name -> logutil.Event + 316, // 147: vtctldata.ReloadSchemaShardResponse.events:type_name -> logutil.Event + 320, // 148: vtctldata.ReparentTabletRequest.tablet:type_name -> topodata.TabletAlias + 320, // 149: vtctldata.ReparentTabletResponse.primary:type_name -> topodata.TabletAlias + 329, // 150: vtctldata.ReshardCreateRequest.tablet_types:type_name -> topodata.TabletType + 317, // 151: vtctldata.ReshardCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference 12, // 152: vtctldata.ReshardCreateRequest.workflow_options:type_name -> vtctldata.WorkflowOptions - 318, // 153: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias - 317, // 154: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time - 317, // 155: vtctldata.RestoreFromBackupRequest.restore_to_timestamp:type_name -> vttime.Time - 318, // 156: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias - 314, // 157: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event - 298, // 158: vtctldata.RetrySchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry - 318, // 159: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias - 316, // 160: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace - 316, // 161: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace - 320, // 162: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard - 327, // 163: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType - 320, // 164: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard - 318, // 165: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 166: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias - 343, // 167: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError - 299, // 168: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry - 300, // 169: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry - 318, // 170: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 171: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias - 319, // 172: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration - 344, // 173: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange - 320, // 174: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard - 320, // 175: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard - 318, // 176: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 177: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias - 318, // 178: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias - 318, // 179: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias - 318, // 180: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias - 321, // 181: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo - 321, // 182: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo - 345, // 183: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias - 345, // 184: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias - 301, // 185: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry - 302, // 186: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry - 303, // 187: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry - 304, // 188: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry - 305, // 189: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry - 327, // 190: vtctldata.VDiffCreateRequest.tablet_types:type_name -> topodata.TabletType - 315, // 191: vtctldata.VDiffCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 319, // 192: vtctldata.VDiffCreateRequest.filtered_replication_wait_time:type_name -> vttime.Duration - 319, // 193: vtctldata.VDiffCreateRequest.wait_update_interval:type_name -> vttime.Duration - 319, // 194: vtctldata.VDiffCreateRequest.max_diff_duration:type_name -> vttime.Duration - 306, // 195: vtctldata.VDiffShowResponse.tablet_responses:type_name -> vtctldata.VDiffShowResponse.TabletResponsesEntry - 307, // 196: vtctldata.WorkflowDeleteResponse.details:type_name -> vtctldata.WorkflowDeleteResponse.TabletInfo - 311, // 197: vtctldata.WorkflowStatusResponse.table_copy_state:type_name -> vtctldata.WorkflowStatusResponse.TableCopyStateEntry - 312, // 198: vtctldata.WorkflowStatusResponse.shard_streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamsEntry - 327, // 199: vtctldata.WorkflowSwitchTrafficRequest.tablet_types:type_name -> topodata.TabletType - 319, // 200: vtctldata.WorkflowSwitchTrafficRequest.max_replication_lag_allowed:type_name -> vttime.Duration - 319, // 201: vtctldata.WorkflowSwitchTrafficRequest.timeout:type_name -> vttime.Duration - 346, // 202: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVReplicationWorkflowRequest - 313, // 203: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo - 347, // 204: vtctldata.GetMirrorRulesResponse.mirror_rules:type_name -> vschema.MirrorRules - 327, // 205: vtctldata.WorkflowMirrorTrafficRequest.tablet_types:type_name -> topodata.TabletType - 274, // 206: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream - 275, // 207: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream - 348, // 208: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl - 318, // 209: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias - 349, // 210: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource - 317, // 211: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time - 317, // 212: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time - 276, // 213: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState - 277, // 214: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log - 278, // 215: vtctldata.Workflow.Stream.throttler_status:type_name -> vtctldata.Workflow.Stream.ThrottlerStatus - 327, // 216: vtctldata.Workflow.Stream.tablet_types:type_name -> topodata.TabletType - 315, // 217: vtctldata.Workflow.Stream.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference - 317, // 218: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time - 317, // 219: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time - 317, // 220: vtctldata.Workflow.Stream.ThrottlerStatus.time_throttled:type_name -> vttime.Time - 281, // 221: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry.value:type_name -> vtctldata.ApplyVSchemaResponse.ParamList - 11, // 222: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard - 345, // 223: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias - 350, // 224: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry.value:type_name -> topodata.ShardReplication - 293, // 225: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList - 351, // 226: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace - 339, // 227: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema - 318, // 228: vtctldata.MoveTablesCreateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 352, // 229: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status - 328, // 230: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet - 236, // 231: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse - 242, // 232: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 242, // 233: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 242, // 234: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 242, // 235: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse - 353, // 236: vtctldata.VDiffShowResponse.TabletResponsesEntry.value:type_name -> tabletmanagerdata.VDiffResponse - 318, // 237: vtctldata.WorkflowDeleteResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 318, // 238: vtctldata.WorkflowStatusResponse.ShardStreamState.tablet:type_name -> topodata.TabletAlias - 309, // 239: vtctldata.WorkflowStatusResponse.ShardStreams.streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamState - 308, // 240: vtctldata.WorkflowStatusResponse.TableCopyStateEntry.value:type_name -> vtctldata.WorkflowStatusResponse.TableCopyState - 310, // 241: vtctldata.WorkflowStatusResponse.ShardStreamsEntry.value:type_name -> vtctldata.WorkflowStatusResponse.ShardStreams - 318, // 242: vtctldata.WorkflowUpdateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias - 243, // [243:243] is the sub-list for method output_type - 243, // [243:243] is the sub-list for method input_type - 243, // [243:243] is the sub-list for extension type_name - 243, // [243:243] is the sub-list for extension extendee - 0, // [0:243] is the sub-list for field type_name + 320, // 153: vtctldata.RestoreFromBackupRequest.tablet_alias:type_name -> topodata.TabletAlias + 319, // 154: vtctldata.RestoreFromBackupRequest.backup_time:type_name -> vttime.Time + 319, // 155: vtctldata.RestoreFromBackupRequest.restore_to_timestamp:type_name -> vttime.Time + 320, // 156: vtctldata.RestoreFromBackupResponse.tablet_alias:type_name -> topodata.TabletAlias + 316, // 157: vtctldata.RestoreFromBackupResponse.event:type_name -> logutil.Event + 300, // 158: vtctldata.RetrySchemaMigrationResponse.rows_affected_by_shard:type_name -> vtctldata.RetrySchemaMigrationResponse.RowsAffectedByShardEntry + 320, // 159: vtctldata.RunHealthCheckRequest.tablet_alias:type_name -> topodata.TabletAlias + 318, // 160: vtctldata.SetKeyspaceDurabilityPolicyResponse.keyspace:type_name -> topodata.Keyspace + 318, // 161: vtctldata.SetKeyspaceShardingInfoResponse.keyspace:type_name -> topodata.Keyspace + 322, // 162: vtctldata.SetShardIsPrimaryServingResponse.shard:type_name -> topodata.Shard + 329, // 163: vtctldata.SetShardTabletControlRequest.tablet_type:type_name -> topodata.TabletType + 322, // 164: vtctldata.SetShardTabletControlResponse.shard:type_name -> topodata.Shard + 320, // 165: vtctldata.SetWritableRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 166: vtctldata.ShardReplicationAddRequest.tablet_alias:type_name -> topodata.TabletAlias + 345, // 167: vtctldata.ShardReplicationFixResponse.error:type_name -> topodata.ShardReplicationError + 301, // 168: vtctldata.ShardReplicationPositionsResponse.replication_statuses:type_name -> vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry + 302, // 169: vtctldata.ShardReplicationPositionsResponse.tablet_map:type_name -> vtctldata.ShardReplicationPositionsResponse.TabletMapEntry + 320, // 170: vtctldata.ShardReplicationRemoveRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 171: vtctldata.SleepTabletRequest.tablet_alias:type_name -> topodata.TabletAlias + 321, // 172: vtctldata.SleepTabletRequest.duration:type_name -> vttime.Duration + 346, // 173: vtctldata.SourceShardAddRequest.key_range:type_name -> topodata.KeyRange + 322, // 174: vtctldata.SourceShardAddResponse.shard:type_name -> topodata.Shard + 322, // 175: vtctldata.SourceShardDeleteResponse.shard:type_name -> topodata.Shard + 320, // 176: vtctldata.StartReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 177: vtctldata.StopReplicationRequest.tablet_alias:type_name -> topodata.TabletAlias + 320, // 178: vtctldata.TabletExternallyReparentedRequest.tablet:type_name -> topodata.TabletAlias + 320, // 179: vtctldata.TabletExternallyReparentedResponse.new_primary:type_name -> topodata.TabletAlias + 320, // 180: vtctldata.TabletExternallyReparentedResponse.old_primary:type_name -> topodata.TabletAlias + 323, // 181: vtctldata.UpdateCellInfoRequest.cell_info:type_name -> topodata.CellInfo + 323, // 182: vtctldata.UpdateCellInfoResponse.cell_info:type_name -> topodata.CellInfo + 347, // 183: vtctldata.UpdateCellsAliasRequest.cells_alias:type_name -> topodata.CellsAlias + 347, // 184: vtctldata.UpdateCellsAliasResponse.cells_alias:type_name -> topodata.CellsAlias + 303, // 185: vtctldata.ValidateResponse.results_by_keyspace:type_name -> vtctldata.ValidateResponse.ResultsByKeyspaceEntry + 304, // 186: vtctldata.ValidateKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry + 305, // 187: vtctldata.ValidateSchemaKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry + 306, // 188: vtctldata.ValidateVersionKeyspaceResponse.results_by_shard:type_name -> vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry + 307, // 189: vtctldata.ValidateVSchemaResponse.results_by_shard:type_name -> vtctldata.ValidateVSchemaResponse.ResultsByShardEntry + 329, // 190: vtctldata.VDiffCreateRequest.tablet_types:type_name -> topodata.TabletType + 317, // 191: vtctldata.VDiffCreateRequest.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 321, // 192: vtctldata.VDiffCreateRequest.filtered_replication_wait_time:type_name -> vttime.Duration + 321, // 193: vtctldata.VDiffCreateRequest.wait_update_interval:type_name -> vttime.Duration + 321, // 194: vtctldata.VDiffCreateRequest.max_diff_duration:type_name -> vttime.Duration + 308, // 195: vtctldata.VDiffShowResponse.tablet_responses:type_name -> vtctldata.VDiffShowResponse.TabletResponsesEntry + 309, // 196: vtctldata.WorkflowDeleteResponse.details:type_name -> vtctldata.WorkflowDeleteResponse.TabletInfo + 313, // 197: vtctldata.WorkflowStatusResponse.table_copy_state:type_name -> vtctldata.WorkflowStatusResponse.TableCopyStateEntry + 314, // 198: vtctldata.WorkflowStatusResponse.shard_streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamsEntry + 329, // 199: vtctldata.WorkflowSwitchTrafficRequest.tablet_types:type_name -> topodata.TabletType + 321, // 200: vtctldata.WorkflowSwitchTrafficRequest.max_replication_lag_allowed:type_name -> vttime.Duration + 321, // 201: vtctldata.WorkflowSwitchTrafficRequest.timeout:type_name -> vttime.Duration + 348, // 202: vtctldata.WorkflowUpdateRequest.tablet_request:type_name -> tabletmanagerdata.UpdateVReplicationWorkflowRequest + 315, // 203: vtctldata.WorkflowUpdateResponse.details:type_name -> vtctldata.WorkflowUpdateResponse.TabletInfo + 349, // 204: vtctldata.GetMirrorRulesResponse.mirror_rules:type_name -> vschema.MirrorRules + 329, // 205: vtctldata.WorkflowMirrorTrafficRequest.tablet_types:type_name -> topodata.TabletType + 272, // 206: vtctldata.LookupVindexCreateParams.vindexes:type_name -> vtctldata.VindexParams + 329, // 207: vtctldata.LookupVindexCreateParams.tablet_types:type_name -> topodata.TabletType + 276, // 208: vtctldata.Workflow.ShardStreamsEntry.value:type_name -> vtctldata.Workflow.ShardStream + 277, // 209: vtctldata.Workflow.ShardStream.streams:type_name -> vtctldata.Workflow.Stream + 350, // 210: vtctldata.Workflow.ShardStream.tablet_controls:type_name -> topodata.Shard.TabletControl + 320, // 211: vtctldata.Workflow.Stream.tablet:type_name -> topodata.TabletAlias + 351, // 212: vtctldata.Workflow.Stream.binlog_source:type_name -> binlogdata.BinlogSource + 319, // 213: vtctldata.Workflow.Stream.transaction_timestamp:type_name -> vttime.Time + 319, // 214: vtctldata.Workflow.Stream.time_updated:type_name -> vttime.Time + 278, // 215: vtctldata.Workflow.Stream.copy_states:type_name -> vtctldata.Workflow.Stream.CopyState + 279, // 216: vtctldata.Workflow.Stream.logs:type_name -> vtctldata.Workflow.Stream.Log + 280, // 217: vtctldata.Workflow.Stream.throttler_status:type_name -> vtctldata.Workflow.Stream.ThrottlerStatus + 329, // 218: vtctldata.Workflow.Stream.tablet_types:type_name -> topodata.TabletType + 317, // 219: vtctldata.Workflow.Stream.tablet_selection_preference:type_name -> tabletmanagerdata.TabletSelectionPreference + 319, // 220: vtctldata.Workflow.Stream.Log.created_at:type_name -> vttime.Time + 319, // 221: vtctldata.Workflow.Stream.Log.updated_at:type_name -> vttime.Time + 319, // 222: vtctldata.Workflow.Stream.ThrottlerStatus.time_throttled:type_name -> vttime.Time + 283, // 223: vtctldata.ApplyVSchemaResponse.UnknownVindexParamsEntry.value:type_name -> vtctldata.ApplyVSchemaResponse.ParamList + 11, // 224: vtctldata.FindAllShardsInKeyspaceResponse.ShardsEntry.value:type_name -> vtctldata.Shard + 347, // 225: vtctldata.GetCellsAliasesResponse.AliasesEntry.value:type_name -> topodata.CellsAlias + 352, // 226: vtctldata.GetShardReplicationResponse.ShardReplicationByCellEntry.value:type_name -> topodata.ShardReplication + 295, // 227: vtctldata.GetSrvKeyspaceNamesResponse.NamesEntry.value:type_name -> vtctldata.GetSrvKeyspaceNamesResponse.NameList + 353, // 228: vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry.value:type_name -> topodata.SrvKeyspace + 341, // 229: vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry.value:type_name -> vschema.SrvVSchema + 320, // 230: vtctldata.MoveTablesCreateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 354, // 231: vtctldata.ShardReplicationPositionsResponse.ReplicationStatusesEntry.value:type_name -> replicationdata.Status + 330, // 232: vtctldata.ShardReplicationPositionsResponse.TabletMapEntry.value:type_name -> topodata.Tablet + 236, // 233: vtctldata.ValidateResponse.ResultsByKeyspaceEntry.value:type_name -> vtctldata.ValidateKeyspaceResponse + 242, // 234: vtctldata.ValidateKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 242, // 235: vtctldata.ValidateSchemaKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 242, // 236: vtctldata.ValidateVersionKeyspaceResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 242, // 237: vtctldata.ValidateVSchemaResponse.ResultsByShardEntry.value:type_name -> vtctldata.ValidateShardResponse + 355, // 238: vtctldata.VDiffShowResponse.TabletResponsesEntry.value:type_name -> tabletmanagerdata.VDiffResponse + 320, // 239: vtctldata.WorkflowDeleteResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 320, // 240: vtctldata.WorkflowStatusResponse.ShardStreamState.tablet:type_name -> topodata.TabletAlias + 311, // 241: vtctldata.WorkflowStatusResponse.ShardStreams.streams:type_name -> vtctldata.WorkflowStatusResponse.ShardStreamState + 310, // 242: vtctldata.WorkflowStatusResponse.TableCopyStateEntry.value:type_name -> vtctldata.WorkflowStatusResponse.TableCopyState + 312, // 243: vtctldata.WorkflowStatusResponse.ShardStreamsEntry.value:type_name -> vtctldata.WorkflowStatusResponse.ShardStreams + 320, // 244: vtctldata.WorkflowUpdateResponse.TabletInfo.tablet:type_name -> topodata.TabletAlias + 245, // [245:245] is the sub-list for method output_type + 245, // [245:245] is the sub-list for method input_type + 245, // [245:245] is the sub-list for extension type_name + 245, // [245:245] is the sub-list for extension extendee + 0, // [0:245] is the sub-list for field type_name } func init() { file_vtctldata_proto_init() } @@ -20533,13 +20772,14 @@ func file_vtctldata_proto_init() { } file_vtctldata_proto_msgTypes[23].OneofWrappers = []any{} file_vtctldata_proto_msgTypes[244].OneofWrappers = []any{} + file_vtctldata_proto_msgTypes[266].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vtctldata_proto_rawDesc, NumEnums: 5, - NumMessages: 309, + NumMessages: 311, NumExtensions: 0, NumServices: 0, }, diff --git a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go index c9ae1183793..d21f5f5f153 100644 --- a/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go +++ b/go/vt/proto/vtctldata/vtctldata_vtproto.pb.go @@ -5951,6 +5951,75 @@ func (m *WorkflowMirrorTrafficResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *LookupVindexCreateParams) CloneVT() *LookupVindexCreateParams { + if m == nil { + return (*LookupVindexCreateParams)(nil) + } + r := new(LookupVindexCreateParams) + r.Keyspace = m.Keyspace + if rhs := m.Vindexes; rhs != nil { + tmpContainer := make([]*VindexParams, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Vindexes = tmpContainer + } + if rhs := m.Cells; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Cells = tmpContainer + } + if rhs := m.TabletTypes; rhs != nil { + tmpContainer := make([]topodata.TabletType, len(rhs)) + copy(tmpContainer, rhs) + r.TabletTypes = tmpContainer + } + if rhs := m.ContinueAfterCopyWithOwner; rhs != nil { + tmpVal := *rhs + r.ContinueAfterCopyWithOwner = &tmpVal + } + if rhs := m.TabletTypesInPreferenceOrder; rhs != nil { + tmpVal := *rhs + r.TabletTypesInPreferenceOrder = &tmpVal + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *LookupVindexCreateParams) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *VindexParams) CloneVT() *VindexParams { + if m == nil { + return (*VindexParams)(nil) + } + r := new(VindexParams) + r.Name = m.Name + r.LookupVindexType = m.LookupVindexType + r.TableOwner = m.TableOwner + r.TableName = m.TableName + r.IgnoreNulls = m.IgnoreNulls + r.TableVindexType = m.TableVindexType + if rhs := m.TableOwnerColumns; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.TableOwnerColumns = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *VindexParams) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *ExecuteVtctlCommandRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -22153,6 +22222,195 @@ func (m *WorkflowMirrorTrafficResponse) MarshalToSizedBufferVT(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *LookupVindexCreateParams) 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 *LookupVindexCreateParams) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *LookupVindexCreateParams) 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 m.TabletTypesInPreferenceOrder != nil { + i-- + if *m.TabletTypesInPreferenceOrder { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.ContinueAfterCopyWithOwner != nil { + i-- + if *m.ContinueAfterCopyWithOwner { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.TabletTypes) > 0 { + var pksize2 int + for _, num := range m.TabletTypes { + pksize2 += protohelpers.SizeOfVarint(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range m.TabletTypes { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x22 + } + if len(m.Cells) > 0 { + for iNdEx := len(m.Cells) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Cells[iNdEx]) + copy(dAtA[i:], m.Cells[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cells[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Vindexes) > 0 { + for iNdEx := len(m.Vindexes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Vindexes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Keyspace) > 0 { + i -= len(m.Keyspace) + copy(dAtA[i:], m.Keyspace) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keyspace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VindexParams) 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 *VindexParams) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *VindexParams) 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.TableVindexType) > 0 { + i -= len(m.TableVindexType) + copy(dAtA[i:], m.TableVindexType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TableVindexType))) + i-- + dAtA[i] = 0x3a + } + if m.IgnoreNulls { + i-- + if m.IgnoreNulls { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TableName))) + i-- + dAtA[i] = 0x2a + } + if len(m.TableOwnerColumns) > 0 { + for iNdEx := len(m.TableOwnerColumns) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TableOwnerColumns[iNdEx]) + copy(dAtA[i:], m.TableOwnerColumns[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TableOwnerColumns[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.TableOwner) > 0 { + i -= len(m.TableOwner) + copy(dAtA[i:], m.TableOwner) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TableOwner))) + i-- + dAtA[i] = 0x1a + } + if len(m.LookupVindexType) > 0 { + i -= len(m.LookupVindexType) + copy(dAtA[i:], m.LookupVindexType) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LookupVindexType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ExecuteVtctlCommandRequest) SizeVT() (n int) { if m == nil { return 0 @@ -28251,109 +28509,187 @@ func (m *WorkflowMirrorTrafficResponse) SizeVT() (n int) { return n } -func (m *ExecuteVtctlCommandRequest) 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 protohelpers.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: ExecuteVtctlCommandRequest: wiretype end group for non-group") +func (m *LookupVindexCreateParams) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Keyspace) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Vindexes) > 0 { + for _, e := range m.Vindexes { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecuteVtctlCommandRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + if len(m.Cells) > 0 { + for _, s := range m.Cells { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.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 protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionTimeout", wireType) - } - m.ActionTimeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActionTimeout |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy + } + if len(m.TabletTypes) > 0 { + l = 0 + for _, e := range m.TabletTypes { + l += protohelpers.SizeOfVarint(uint64(e)) } + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } + if m.ContinueAfterCopyWithOwner != nil { + n += 2 + } + if m.TabletTypesInPreferenceOrder != nil { + n += 2 + } + n += len(m.unknownFields) + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *VindexParams) SizeVT() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.LookupVindexType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.TableOwner) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.TableOwnerColumns) > 0 { + for _, s := range m.TableOwnerColumns { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + l = len(m.TableName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.IgnoreNulls { + n += 2 + } + l = len(m.TableVindexType) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n } -func (m *ExecuteVtctlCommandResponse) UnmarshalVT(dAtA []byte) error { + +func (m *ExecuteVtctlCommandRequest) 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 protohelpers.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: ExecuteVtctlCommandRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecuteVtctlCommandRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActionTimeout", wireType) + } + m.ActionTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ActionTimeout |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.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 *ExecuteVtctlCommandResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -68147,3 +68483,526 @@ func (m *WorkflowMirrorTrafficResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *LookupVindexCreateParams) 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 protohelpers.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: LookupVindexCreateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LookupVindexCreateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keyspace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keyspace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vindexes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Vindexes = append(m.Vindexes, &VindexParams{}) + if err := m.Vindexes[len(m.Vindexes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cells", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cells = append(m.Cells, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType == 0 { + var v topodata.TabletType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= topodata.TabletType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TabletTypes = append(m.TabletTypes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.TabletTypes) == 0 { + m.TabletTypes = make([]topodata.TabletType, 0, elementCount) + } + for iNdEx < postIndex { + var v topodata.TabletType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= topodata.TabletType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TabletTypes = append(m.TabletTypes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field TabletTypes", wireType) + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContinueAfterCopyWithOwner", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.ContinueAfterCopyWithOwner = &b + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TabletTypesInPreferenceOrder", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TabletTypesInPreferenceOrder = &b + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.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 *VindexParams) 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 protohelpers.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: VindexParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VindexParams: 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 protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.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 LookupVindexType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LookupVindexType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableOwner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableOwner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableOwnerColumns", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableOwnerColumns = append(m.TableOwnerColumns, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IgnoreNulls", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IgnoreNulls = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableVindexType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.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 protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TableVindexType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.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 +} diff --git a/go/vt/vtctl/workflow/lookup_vindex.go b/go/vt/vtctl/workflow/lookup_vindex.go index 157dba083b0..1950eec5720 100644 --- a/go/vt/vtctl/workflow/lookup_vindex.go +++ b/go/vt/vtctl/workflow/lookup_vindex.go @@ -77,13 +77,27 @@ func (lv *lookupVindex) prepareCreate(ctx context.Context, workflow, keyspace st materializeQuery string ) + if specs == nil { + return nil, nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "no vindex provided") + } + if len(specs.Vindexes) != 1 { + return nil, nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "only one vindex must be specified") + } + + vindexName := maps.Keys(specs.Vindexes)[0] + vindex := maps.Values(specs.Vindexes)[0] + // Validate input vindex. - vindex, vInfo, err := lv.validateAndGetVindex(specs) + vInfo, err := lv.validateAndGetVindexInfo(vindexName, vindex, specs.Tables) if err != nil { return nil, nil, nil, nil, err } - vInfo.sourceTable, vInfo.sourceTableName, err = getSourceTable(specs, vInfo.targetTableName, vInfo.fromCols) + if len(specs.Tables) < 1 || len(specs.Tables) > 2 { + return nil, nil, nil, nil, fmt.Errorf("one or two tables must be specified") + } + + vInfo.sourceTable, vInfo.sourceTableName, err = getSourceTable(specs.Tables, vInfo.targetTableName, vInfo.fromCols) if err != nil { return nil, nil, nil, nil, err } @@ -157,33 +171,11 @@ func (lv *lookupVindex) prepareCreate(ctx context.Context, workflow, keyspace st // Update targetVSchema. targetTable := specs.Tables[vInfo.targetTableName] if targetVSchema.Sharded { - // Choose a primary vindex type for the lookup table based on the source - // definition if one was not explicitly specified. - var targetVindexType string - var targetVindex *vschemapb.Vindex - for _, field := range tableSchema.TableDefinitions[0].Fields { - if sourceVindexColumns[0] == field.Name { - if targetTable != nil && len(targetTable.ColumnVindexes) > 0 { - targetVindexType = targetTable.ColumnVindexes[0].Name - } - if targetVindexType == "" { - targetVindexType, err = vindexes.ChooseVindexForType(field.Type) - if err != nil { - return nil, nil, nil, nil, err - } - } - targetVindex = &vschemapb.Vindex{ - Type: targetVindexType, - } - break - } - } - if targetVindex == nil { - // Unreachable. We validated column names when generating the DDL. - return nil, nil, nil, nil, - vterrors.Errorf(vtrpcpb.Code_INTERNAL, "column %s not found in target schema %s", - sourceVindexColumns[0], tableSchema.TableDefinitions[0].Schema) + targetVindex, err := getTargetVindex(tableSchema.TableDefinitions[0], sourceVindexColumns[0], targetTable) + if err != nil { + return nil, nil, nil, nil, err } + targetVindexType := targetVindex.Type if existing, ok := targetVSchema.Vindexes[targetVindexType]; ok { if !proto.Equal(existing, targetVindex) { @@ -243,6 +235,200 @@ func (lv *lookupVindex) prepareCreate(ctx context.Context, workflow, keyspace st return ms, sourceVSchema, targetVSchema, cancelFunc, nil } +// prepareMultipleCreate is used for processing multiple vindexes. +// So, it doesn't throw error if `specs` contains more than 1 vindex. +// Unlike prepareCreate, it expects only owned lookup vindexes. +func (lv *lookupVindex) prepareMultipleCreate(ctx context.Context, workflow, keyspace string, specs *vschemapb.Keyspace, continueAfterCopyWithOwner bool) ( + ms *vtctldatapb.MaterializeSettings, sourceVSchema, targetVSchema *topo.KeyspaceVSchemaInfo, cancelFunc func() error, err error) { + var ( + // sourceVSchemaTable is the table info present in the vschema. + sourceVSchemaTable *vschemapb.Table + // sourceVindexColumns are computed from the input sourceTable. + sourceVindexColumns []string + + // origTargetVSchema is the original target keyspace VSchema. + // If any error occurs, we can revert back to the original VSchema. + origTargetVSchema *topo.KeyspaceVSchemaInfo + + // Target table info. + createDDL string + materializeQuery string + + targetKeyspace string + tableSettings []*vtctldatapb.TableMaterializeSettings + ) + + if specs == nil || len(specs.Vindexes) == 0 { + return nil, nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "no vindex provided") + } + + targetVSchemaChanged := false + + // Collect columnVindexes in a map, for faster access of source column vindexes + // in the main loop. + columnVindexByName := map[string]*vschemapb.ColumnVindex{} + for _, table := range specs.Tables { + for _, colVindex := range table.ColumnVindexes { + columnVindexByName[colVindex.Name] = colVindex + } + } + + for vindexName, vindex := range specs.Vindexes { + if vindex.Owner == "" { + return nil, nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "vindex(%s) has no owner", vindexName) + } + + vInfo, err := lv.validateAndGetVindexInfo(vindexName, vindex, specs.Tables) + if err != nil { + return nil, nil, nil, nil, err + } + + var ok bool + if vInfo.sourceTable, ok = specs.Tables[vindex.Owner]; !ok { + return nil, nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "table owner not found for vindex %s", vInfo.name) + } + vInfo.sourceTableName = vindex.Owner + + targetTable := specs.Tables[vInfo.targetTableName] + + sourceVindexColumns, err = getSourceVindexColumns(vInfo, columnVindexByName[vindexName]) + if err != nil { + return nil, nil, nil, nil, err + } + + // This should be possible only for the first iteration. + if sourceVSchema == nil || targetVSchema == nil { + targetKeyspace = vInfo.targetKeyspace + sourceVSchema, targetVSchema, err = lv.getTargetAndSourceVSchema(ctx, keyspace, vInfo.targetKeyspace) + if err != nil { + return nil, nil, nil, nil, err + } + // Save a copy of the original vschema if we modify it and need to provide + // a cancelFunc. We do NOT want to clone the key version as we explicitly + // want to go back in time. So we only clone the internal vschema.Keyspace. + origTargetVSchema = &topo.KeyspaceVSchemaInfo{ + Name: vInfo.targetKeyspace, + Keyspace: targetVSchema.Keyspace.CloneVT(), + } + } + + if existing, ok := sourceVSchema.Vindexes[vInfo.name]; ok { + if !proto.Equal(existing, vindex) { // If the exact same vindex already exists then we can re-use it + return nil, nil, nil, nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "a conflicting vindex named %s already exists in the %s keyspace", + vInfo.name, keyspace) + } + } + + sourceVSchemaTable = sourceVSchema.Tables[vInfo.sourceTableName] + if sourceVSchemaTable == nil && !schema.IsInternalOperationTableName(vInfo.sourceTableName) { + return nil, nil, nil, nil, + vterrors.Errorf(vtrpcpb.Code_INTERNAL, "table %s not found in the %s keyspace", vInfo.sourceTableName, keyspace) + } + if err := validateNonConflictingColumnVindex(sourceVSchemaTable, vInfo, sourceVindexColumns, keyspace); err != nil { + return nil, nil, nil, nil, err + } + + // Validate against source schema. + sourceShards, err := lv.ts.GetServingShards(ctx, keyspace) + if err != nil { + return nil, nil, nil, nil, err + } + onesource := sourceShards[0] + if onesource.PrimaryAlias == nil { + return nil, nil, nil, nil, + vterrors.Errorf(vtrpcpb.Code_INTERNAL, "source shard %s has no primary", onesource.ShardName()) + } + + req := &tabletmanagerdatapb.GetSchemaRequest{Tables: []string{vInfo.sourceTableName}} + tableSchema, err := schematools.GetSchema(ctx, lv.ts, lv.tmc, onesource.PrimaryAlias, req) + if err != nil { + return nil, nil, nil, nil, err + } + if len(tableSchema.TableDefinitions) != 1 { + return nil, nil, nil, nil, + vterrors.Errorf(vtrpcpb.Code_INTERNAL, "unexpected number of tables (%d) returned from %s schema", + len(tableSchema.TableDefinitions), keyspace) + } + + // Generate "create table" statement. + createDDL, err = lv.generateCreateDDLStatement(tableSchema, sourceVindexColumns, vInfo, vindex) + if err != nil { + return nil, nil, nil, nil, err + } + + // Generate vreplication query. + materializeQuery = generateMaterializeQuery(vInfo, vindex, sourceVindexColumns) + + // Update targetVSchema. + if targetVSchema.Sharded { + targetVindex, err := getTargetVindex(tableSchema.TableDefinitions[0], sourceVindexColumns[0], targetTable) + if err != nil { + return nil, nil, nil, nil, err + } + targetVindexType := targetVindex.Type + + if existing, ok := targetVSchema.Vindexes[targetVindexType]; ok { + if !proto.Equal(existing, targetVindex) { + return nil, nil, nil, nil, + vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "a conflicting vindex named %v already exists in the %s keyspace", + targetVindexType, vInfo.targetKeyspace) + } + } else { + targetVSchema.Vindexes[targetVindexType] = targetVindex + targetVSchemaChanged = true + } + + targetTable = &vschemapb.Table{ + ColumnVindexes: []*vschemapb.ColumnVindex{{ + Column: vInfo.fromCols[0], + Name: targetVindexType, + }}, + } + } else { + targetTable = &vschemapb.Table{} + } + if existing, ok := targetVSchema.Tables[vInfo.targetTableName]; ok { + if !proto.Equal(existing, targetTable) { + return nil, nil, nil, nil, + vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "a conflicting table named %s already exists in the %s vschema", + vInfo.targetTableName, vInfo.targetKeyspace) + } + } else { + targetVSchema.Tables[vInfo.targetTableName] = targetTable + targetVSchemaChanged = true + } + + materializeTableSettings := &vtctldatapb.TableMaterializeSettings{ + TargetTable: vInfo.targetTableName, + SourceExpression: materializeQuery, + CreateDdl: createDDL, + } + + tableSettings = append(tableSettings, materializeTableSettings) + // Update sourceVSchema + sourceVSchema.Vindexes[vInfo.name] = vindex + sourceVSchemaTable.ColumnVindexes = append(sourceVSchemaTable.ColumnVindexes, columnVindexByName[vindexName]) + } + + if targetVSchemaChanged { + cancelFunc = func() error { + // Restore the original target vschema. + return lv.ts.SaveVSchema(ctx, origTargetVSchema) + } + } + + ms = &vtctldatapb.MaterializeSettings{ + Workflow: workflow, + MaterializationIntent: vtctldatapb.MaterializationIntent_CREATELOOKUPINDEX, + SourceKeyspace: keyspace, + TargetKeyspace: targetKeyspace, + StopAfterCopy: !continueAfterCopyWithOwner, + TableSettings: tableSettings, + } + + return ms, sourceVSchema, targetVSchema, cancelFunc, nil +} + // vindexInfo holds the validated vindex configuration type vindexInfo struct { name string @@ -258,24 +444,14 @@ type vindexInfo struct { } // validateAndGetVindex validates and extracts vindex configuration -func (lv *lookupVindex) validateAndGetVindex(specs *vschemapb.Keyspace) (*vschemapb.Vindex, *vindexInfo, error) { - if specs == nil { - return nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "no vindex provided") - } - if len(specs.Vindexes) != 1 { - return nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "only one vindex must be specified") - } - - vindexName := maps.Keys(specs.Vindexes)[0] - vindex := maps.Values(specs.Vindexes)[0] - +func (lv *lookupVindex) validateAndGetVindexInfo(vindexName string, vindex *vschemapb.Vindex, tables map[string]*vschemapb.Table) (*vindexInfo, error) { if !strings.Contains(vindex.Type, "lookup") { - return nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "vindex %s is not a lookup type", vindex.Type) + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "vindex %s is not a lookup type", vindex.Type) } targetKeyspace, targetTableName, err := lv.parser.ParseTable(vindex.Params["table"]) if err != nil || targetKeyspace == "" { - return nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "vindex table name (%s) must be in the form .", vindex.Params["table"]) } @@ -286,7 +462,7 @@ func (lv *lookupVindex) validateAndGetVindex(specs *vschemapb.Keyspace) (*vschem if strings.Contains(vindex.Type, "unique") { if len(vindexFromCols) != 1 { - return nil, nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "unique vindex 'from' should have only one column") + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "unique vindex 'from' should have only one column") } } @@ -297,7 +473,7 @@ func (lv *lookupVindex) validateAndGetVindex(specs *vschemapb.Keyspace) (*vschem // See if we can create the vindex without errors. if _, err := vindexes.CreateVindex(vindex.Type, vindexName, vindex.Params); err != nil { - return nil, nil, err + return nil, err } ignoreNulls := false @@ -309,18 +485,18 @@ func (lv *lookupVindex) validateAndGetVindex(specs *vschemapb.Keyspace) (*vschem case "false": ignoreNulls = false default: - return nil, nil, + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "ignore_nulls (%s) value must be 'true' or 'false'", ignoreNullsStr) } } // Validate input table. - if len(specs.Tables) < 1 || len(specs.Tables) > 2 { - return nil, nil, fmt.Errorf("one or two tables must be specified") + if len(tables) < 1 { + return nil, fmt.Errorf("atleast one table must be specified") } - return vindex, &vindexInfo{ + return &vindexInfo{ name: vindexName, targetKeyspace: targetKeyspace, targetTableName: targetTableName, @@ -358,9 +534,9 @@ func (lv *lookupVindex) getTargetAndSourceVSchema(ctx context.Context, sourceKey return sourceVSchema, targetVSchema, nil } -func getSourceTable(specs *vschemapb.Keyspace, targetTableName string, fromCols []string) (sourceTable *vschemapb.Table, sourceTableName string, err error) { +func getSourceTable(tables map[string]*vschemapb.Table, targetTableName string, fromCols []string) (sourceTable *vschemapb.Table, sourceTableName string, err error) { // Loop executes once or twice. - for tableName, table := range specs.Tables { + for tableName, table := range tables { if len(table.ColumnVindexes) != 1 { return nil, "", vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "exactly one ColumnVindex must be specified for the %s table", tableName) @@ -471,7 +647,7 @@ func generateMaterializeQuery(vInfo *vindexInfo, vindex *vschemapb.Vindex, sourc } // validateSourceTableAndGetVindexColumns validates input table and vindex consistency, and returns sourceVindexColumns. -func validateSourceTableAndGetVindexColumns(vInfo *vindexInfo, vindex *vschemapb.Vindex, keyspace string) (sourceVindexColumns []string, err error) { +func validateSourceTableAndGetVindexColumns(vInfo *vindexInfo, vindex *vschemapb.Vindex, keyspace string) ([]string, error) { if vInfo.sourceTable == nil || len(vInfo.sourceTable.ColumnVindexes) != 1 { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "No ColumnVindex found for the owner table (%s) in the %s keyspace", vInfo.sourceTable, keyspace) @@ -485,20 +661,29 @@ func validateSourceTableAndGetVindexColumns(vInfo *vindexInfo, vindex *vschemapb return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "vindex owner (%s) must match table name (%s)", vindex.Owner, vInfo.sourceTableName) } - if len(vInfo.sourceTable.ColumnVindexes[0].Columns) != 0 { - sourceVindexColumns = vInfo.sourceTable.ColumnVindexes[0].Columns + + return getSourceVindexColumns(vInfo, vInfo.sourceTable.ColumnVindexes[0]) +} + +func getSourceVindexColumns(vInfo *vindexInfo, colVindex *vschemapb.ColumnVindex) (sourceVindexColumns []string, err error) { + if colVindex == nil { + return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "column vindex name (%s) not found in table %s", + vInfo.name, vInfo.sourceTableName) + } + + if len(colVindex.Columns) != 0 { + sourceVindexColumns = colVindex.Columns } else { - if vInfo.sourceTable.ColumnVindexes[0].Column == "" { + if colVindex.Column == "" { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "at least one column must be specified in ColumnVindexes for the %s table", vInfo.sourceTableName) } - sourceVindexColumns = []string{vInfo.sourceTable.ColumnVindexes[0].Column} + sourceVindexColumns = []string{colVindex.Column} } if len(sourceVindexColumns) != len(vInfo.fromCols) { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "length of table columns (%d) differs from length of vindex columns (%d)", len(sourceVindexColumns), len(vInfo.fromCols)) } - return sourceVindexColumns, nil } @@ -547,6 +732,36 @@ func generateColDef(lines []string, sourceVindexCol, vindexFromCol string) (stri return "", fmt.Errorf("column %s not found in schema %v", sourceVindexCol, lines) } +// getTargetVindex returns the targetVindex. We choose a primary vindex type +// for the lookup table based on the source definition if one was not explicitly specified. +func getTargetVindex(sourceTableDefinition *tabletmanagerdatapb.TableDefinition, sourceVindexColumn string, targetTable *vschemapb.Table) ( + targetVindex *vschemapb.Vindex, err error) { + var targetVindexType string + for _, field := range sourceTableDefinition.Fields { + if sourceVindexColumn == field.Name { + if targetTable != nil && len(targetTable.ColumnVindexes) > 0 { + targetVindexType = targetTable.ColumnVindexes[0].Name + } + if targetVindexType == "" { + targetVindexType, err = vindexes.ChooseVindexForType(field.Type) + if err != nil { + return + } + } + targetVindex = &vschemapb.Vindex{ + Type: targetVindexType, + } + break + } + } + if targetVindex == nil { + err = vterrors.Errorf(vtrpcpb.Code_INTERNAL, "column %s not found in target schema %s", + sourceVindexColumn, sourceTableDefinition.Schema) + return + } + return +} + // validateExternalizedVindex checks if a given vindex is externalized. // A vindex is considered externalized if it has an owner and is not in write-only mode. func (lv *lookupVindex) validateExternalizedVindex(vindex *vschemapb.Vindex) error { diff --git a/go/vt/vtctl/workflow/materializer_test.go b/go/vt/vtctl/workflow/materializer_test.go index c28beb933e8..cc36297cd11 100644 --- a/go/vt/vtctl/workflow/materializer_test.go +++ b/go/vt/vtctl/workflow/materializer_test.go @@ -2592,20 +2592,6 @@ func TestCreateLookupVindexFailures(t *testing.T) { schemaAdditions []*tabletmanagerdatapb.TableDefinition err string }{ - { - description: "dup vindex", - input: &vschemapb.Keyspace{ - Vindexes: map[string]*vschemapb.Vindex{ - "v1": { - Type: "xxhash", - }, - "v2": { - Type: "xxhash", - }, - }, - }, - err: "only one vindex must be specified", - }, { description: "not a lookup", input: &vschemapb.Keyspace{ @@ -2684,7 +2670,7 @@ func TestCreateLookupVindexFailures(t *testing.T) { input: &vschemapb.Keyspace{ Vindexes: unique, }, - err: "one or two tables must be specified", + err: "atleast one table must be specified", }, { description: "too many tables", diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index 68eeb31d0d0..66721f6c320 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -605,7 +605,19 @@ func (s *Server) LookupVindexCreate(ctx context.Context, req *vtctldatapb.Lookup lv := newLookupVindex(s) - ms, sourceVSchema, targetVSchema, cancelFunc, err := lv.prepareCreate(ctx, req.Workflow, req.Keyspace, req.Vindex, req.ContinueAfterCopyWithOwner) + var ( + ms *vtctldatapb.MaterializeSettings + sourceVSchema *topo.KeyspaceVSchemaInfo + targetVSchema *topo.KeyspaceVSchemaInfo + cancelFunc func() error + err error + ) + if req.Vindex != nil && len(req.Vindex.Vindexes) > 1 { + ms, sourceVSchema, targetVSchema, cancelFunc, err = lv.prepareMultipleCreate(ctx, req.Workflow, req.Keyspace, req.Vindex, req.ContinueAfterCopyWithOwner) + } else { + ms, sourceVSchema, targetVSchema, cancelFunc, err = lv.prepareCreate(ctx, req.Workflow, req.Keyspace, req.Vindex, req.ContinueAfterCopyWithOwner) + } + if err != nil { return nil, err } diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 745a3599cc9..c3d3e862db9 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -2213,3 +2213,37 @@ message WorkflowMirrorTrafficResponse { string start_state = 2; string current_state = 3; } + +message LookupVindexCreateParams { + // Keyspace to create the Lookup Vindex(es) in. + string keyspace = 1; + // Vindex(es) configuration. + repeated VindexParams vindexes = 2; + + // VReplication specific options. + repeated string cells = 3; + repeated topodata.TabletType tablet_types = 4; + optional bool continue_after_copy_with_owner = 5; + optional bool tablet_types_in_preference_order = 6; +} + +message VindexParams { + // Name of the Lookup Vindex to create. + string name = 1; + // Type of Lookup Vindex to create. + string lookup_vindex_type = 2; + // Table holding the data which we should use to backfill the Lookup Vindex. + // This must exist in the same keyspace as the Lookup Vindex. + string table_owner = 3; + // Columns to read from the owner table. + repeated string table_owner_columns = 4; + // Name of the lookup table. If not specified, then it will be created using + // the same name as the Lookup Vindex. + string table_name = 5; + // Do not add corresponding records in the lookup table if any of the owner + // table's 'from' fields are NULL. + bool ignore_nulls = 6; + // The primary vindex name/type to use for the lookup table, + // if the table-keyspace is sharded. + string table_vindex_type = 7; +} \ No newline at end of file diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 5a8859b90e7..43432899e17 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -80682,4 +80682,264 @@ export namespace vtctldata { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a LookupVindexCreateParams. */ + interface ILookupVindexCreateParams { + + /** LookupVindexCreateParams keyspace */ + keyspace?: (string|null); + + /** LookupVindexCreateParams vindexes */ + vindexes?: (vtctldata.IVindexParams[]|null); + + /** LookupVindexCreateParams cells */ + cells?: (string[]|null); + + /** LookupVindexCreateParams tablet_types */ + tablet_types?: (topodata.TabletType[]|null); + + /** LookupVindexCreateParams continue_after_copy_with_owner */ + continue_after_copy_with_owner?: (boolean|null); + + /** LookupVindexCreateParams tablet_types_in_preference_order */ + tablet_types_in_preference_order?: (boolean|null); + } + + /** Represents a LookupVindexCreateParams. */ + class LookupVindexCreateParams implements ILookupVindexCreateParams { + + /** + * Constructs a new LookupVindexCreateParams. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.ILookupVindexCreateParams); + + /** LookupVindexCreateParams keyspace. */ + public keyspace: string; + + /** LookupVindexCreateParams vindexes. */ + public vindexes: vtctldata.IVindexParams[]; + + /** LookupVindexCreateParams cells. */ + public cells: string[]; + + /** LookupVindexCreateParams tablet_types. */ + public tablet_types: topodata.TabletType[]; + + /** LookupVindexCreateParams continue_after_copy_with_owner. */ + public continue_after_copy_with_owner?: (boolean|null); + + /** LookupVindexCreateParams tablet_types_in_preference_order. */ + public tablet_types_in_preference_order?: (boolean|null); + + /** + * Creates a new LookupVindexCreateParams instance using the specified properties. + * @param [properties] Properties to set + * @returns LookupVindexCreateParams instance + */ + public static create(properties?: vtctldata.ILookupVindexCreateParams): vtctldata.LookupVindexCreateParams; + + /** + * Encodes the specified LookupVindexCreateParams message. Does not implicitly {@link vtctldata.LookupVindexCreateParams.verify|verify} messages. + * @param message LookupVindexCreateParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.ILookupVindexCreateParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookupVindexCreateParams message, length delimited. Does not implicitly {@link vtctldata.LookupVindexCreateParams.verify|verify} messages. + * @param message LookupVindexCreateParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.ILookupVindexCreateParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookupVindexCreateParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookupVindexCreateParams + * @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): vtctldata.LookupVindexCreateParams; + + /** + * Decodes a LookupVindexCreateParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookupVindexCreateParams + * @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)): vtctldata.LookupVindexCreateParams; + + /** + * Verifies a LookupVindexCreateParams 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 LookupVindexCreateParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookupVindexCreateParams + */ + public static fromObject(object: { [k: string]: any }): vtctldata.LookupVindexCreateParams; + + /** + * Creates a plain object from a LookupVindexCreateParams message. Also converts values to other types if specified. + * @param message LookupVindexCreateParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.LookupVindexCreateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookupVindexCreateParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookupVindexCreateParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VindexParams. */ + interface IVindexParams { + + /** VindexParams name */ + name?: (string|null); + + /** VindexParams lookup_vindex_type */ + lookup_vindex_type?: (string|null); + + /** VindexParams table_owner */ + table_owner?: (string|null); + + /** VindexParams table_owner_columns */ + table_owner_columns?: (string[]|null); + + /** VindexParams table_name */ + table_name?: (string|null); + + /** VindexParams ignore_nulls */ + ignore_nulls?: (boolean|null); + + /** VindexParams table_vindex_type */ + table_vindex_type?: (string|null); + } + + /** Represents a VindexParams. */ + class VindexParams implements IVindexParams { + + /** + * Constructs a new VindexParams. + * @param [properties] Properties to set + */ + constructor(properties?: vtctldata.IVindexParams); + + /** VindexParams name. */ + public name: string; + + /** VindexParams lookup_vindex_type. */ + public lookup_vindex_type: string; + + /** VindexParams table_owner. */ + public table_owner: string; + + /** VindexParams table_owner_columns. */ + public table_owner_columns: string[]; + + /** VindexParams table_name. */ + public table_name: string; + + /** VindexParams ignore_nulls. */ + public ignore_nulls: boolean; + + /** VindexParams table_vindex_type. */ + public table_vindex_type: string; + + /** + * Creates a new VindexParams instance using the specified properties. + * @param [properties] Properties to set + * @returns VindexParams instance + */ + public static create(properties?: vtctldata.IVindexParams): vtctldata.VindexParams; + + /** + * Encodes the specified VindexParams message. Does not implicitly {@link vtctldata.VindexParams.verify|verify} messages. + * @param message VindexParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtctldata.IVindexParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VindexParams message, length delimited. Does not implicitly {@link vtctldata.VindexParams.verify|verify} messages. + * @param message VindexParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtctldata.IVindexParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VindexParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VindexParams + * @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): vtctldata.VindexParams; + + /** + * Decodes a VindexParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VindexParams + * @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)): vtctldata.VindexParams; + + /** + * Verifies a VindexParams 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 VindexParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VindexParams + */ + public static fromObject(object: { [k: string]: any }): vtctldata.VindexParams; + + /** + * Creates a plain object from a VindexParams message. Also converts values to other types if specified. + * @param message VindexParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtctldata.VindexParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VindexParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VindexParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index cafe51c0058..d719e829be5 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -197305,6 +197305,834 @@ export const vtctldata = $root.vtctldata = (() => { return WorkflowMirrorTrafficResponse; })(); + vtctldata.LookupVindexCreateParams = (function() { + + /** + * Properties of a LookupVindexCreateParams. + * @memberof vtctldata + * @interface ILookupVindexCreateParams + * @property {string|null} [keyspace] LookupVindexCreateParams keyspace + * @property {Array.|null} [vindexes] LookupVindexCreateParams vindexes + * @property {Array.|null} [cells] LookupVindexCreateParams cells + * @property {Array.|null} [tablet_types] LookupVindexCreateParams tablet_types + * @property {boolean|null} [continue_after_copy_with_owner] LookupVindexCreateParams continue_after_copy_with_owner + * @property {boolean|null} [tablet_types_in_preference_order] LookupVindexCreateParams tablet_types_in_preference_order + */ + + /** + * Constructs a new LookupVindexCreateParams. + * @memberof vtctldata + * @classdesc Represents a LookupVindexCreateParams. + * @implements ILookupVindexCreateParams + * @constructor + * @param {vtctldata.ILookupVindexCreateParams=} [properties] Properties to set + */ + function LookupVindexCreateParams(properties) { + this.vindexes = []; + this.cells = []; + this.tablet_types = []; + 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]]; + } + + /** + * LookupVindexCreateParams keyspace. + * @member {string} keyspace + * @memberof vtctldata.LookupVindexCreateParams + * @instance + */ + LookupVindexCreateParams.prototype.keyspace = ""; + + /** + * LookupVindexCreateParams vindexes. + * @member {Array.} vindexes + * @memberof vtctldata.LookupVindexCreateParams + * @instance + */ + LookupVindexCreateParams.prototype.vindexes = $util.emptyArray; + + /** + * LookupVindexCreateParams cells. + * @member {Array.} cells + * @memberof vtctldata.LookupVindexCreateParams + * @instance + */ + LookupVindexCreateParams.prototype.cells = $util.emptyArray; + + /** + * LookupVindexCreateParams tablet_types. + * @member {Array.} tablet_types + * @memberof vtctldata.LookupVindexCreateParams + * @instance + */ + LookupVindexCreateParams.prototype.tablet_types = $util.emptyArray; + + /** + * LookupVindexCreateParams continue_after_copy_with_owner. + * @member {boolean|null|undefined} continue_after_copy_with_owner + * @memberof vtctldata.LookupVindexCreateParams + * @instance + */ + LookupVindexCreateParams.prototype.continue_after_copy_with_owner = null; + + /** + * LookupVindexCreateParams tablet_types_in_preference_order. + * @member {boolean|null|undefined} tablet_types_in_preference_order + * @memberof vtctldata.LookupVindexCreateParams + * @instance + */ + LookupVindexCreateParams.prototype.tablet_types_in_preference_order = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookupVindexCreateParams.prototype, "_continue_after_copy_with_owner", { + get: $util.oneOfGetter($oneOfFields = ["continue_after_copy_with_owner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookupVindexCreateParams.prototype, "_tablet_types_in_preference_order", { + get: $util.oneOfGetter($oneOfFields = ["tablet_types_in_preference_order"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LookupVindexCreateParams instance using the specified properties. + * @function create + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {vtctldata.ILookupVindexCreateParams=} [properties] Properties to set + * @returns {vtctldata.LookupVindexCreateParams} LookupVindexCreateParams instance + */ + LookupVindexCreateParams.create = function create(properties) { + return new LookupVindexCreateParams(properties); + }; + + /** + * Encodes the specified LookupVindexCreateParams message. Does not implicitly {@link vtctldata.LookupVindexCreateParams.verify|verify} messages. + * @function encode + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {vtctldata.ILookupVindexCreateParams} message LookupVindexCreateParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookupVindexCreateParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); + if (message.vindexes != null && message.vindexes.length) + for (let i = 0; i < message.vindexes.length; ++i) + $root.vtctldata.VindexParams.encode(message.vindexes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cells != null && message.cells.length) + for (let i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); + if (message.tablet_types != null && message.tablet_types.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.tablet_types.length; ++i) + writer.int32(message.tablet_types[i]); + writer.ldelim(); + } + if (message.continue_after_copy_with_owner != null && Object.hasOwnProperty.call(message, "continue_after_copy_with_owner")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.continue_after_copy_with_owner); + if (message.tablet_types_in_preference_order != null && Object.hasOwnProperty.call(message, "tablet_types_in_preference_order")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.tablet_types_in_preference_order); + return writer; + }; + + /** + * Encodes the specified LookupVindexCreateParams message, length delimited. Does not implicitly {@link vtctldata.LookupVindexCreateParams.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {vtctldata.ILookupVindexCreateParams} message LookupVindexCreateParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookupVindexCreateParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookupVindexCreateParams message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.LookupVindexCreateParams} LookupVindexCreateParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookupVindexCreateParams.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.vtctldata.LookupVindexCreateParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.keyspace = reader.string(); + break; + } + case 2: { + if (!(message.vindexes && message.vindexes.length)) + message.vindexes = []; + message.vindexes.push($root.vtctldata.VindexParams.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + } + case 4: { + if (!(message.tablet_types && message.tablet_types.length)) + message.tablet_types = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.tablet_types.push(reader.int32()); + } else + message.tablet_types.push(reader.int32()); + break; + } + case 5: { + message.continue_after_copy_with_owner = reader.bool(); + break; + } + case 6: { + message.tablet_types_in_preference_order = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookupVindexCreateParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.LookupVindexCreateParams} LookupVindexCreateParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookupVindexCreateParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookupVindexCreateParams message. + * @function verify + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookupVindexCreateParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.vindexes != null && message.hasOwnProperty("vindexes")) { + if (!Array.isArray(message.vindexes)) + return "vindexes: array expected"; + for (let i = 0; i < message.vindexes.length; ++i) { + let error = $root.vtctldata.VindexParams.verify(message.vindexes[i]); + if (error) + return "vindexes." + error; + } + } + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (let i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } + if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) { + if (!Array.isArray(message.tablet_types)) + return "tablet_types: array expected"; + for (let i = 0; i < message.tablet_types.length; ++i) + switch (message.tablet_types[i]) { + default: + return "tablet_types: enum value[] expected"; + case 0: + case 1: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message.continue_after_copy_with_owner != null && message.hasOwnProperty("continue_after_copy_with_owner")) { + properties._continue_after_copy_with_owner = 1; + if (typeof message.continue_after_copy_with_owner !== "boolean") + return "continue_after_copy_with_owner: boolean expected"; + } + if (message.tablet_types_in_preference_order != null && message.hasOwnProperty("tablet_types_in_preference_order")) { + properties._tablet_types_in_preference_order = 1; + if (typeof message.tablet_types_in_preference_order !== "boolean") + return "tablet_types_in_preference_order: boolean expected"; + } + return null; + }; + + /** + * Creates a LookupVindexCreateParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.LookupVindexCreateParams} LookupVindexCreateParams + */ + LookupVindexCreateParams.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.LookupVindexCreateParams) + return object; + let message = new $root.vtctldata.LookupVindexCreateParams(); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.vindexes) { + if (!Array.isArray(object.vindexes)) + throw TypeError(".vtctldata.LookupVindexCreateParams.vindexes: array expected"); + message.vindexes = []; + for (let i = 0; i < object.vindexes.length; ++i) { + if (typeof object.vindexes[i] !== "object") + throw TypeError(".vtctldata.LookupVindexCreateParams.vindexes: object expected"); + message.vindexes[i] = $root.vtctldata.VindexParams.fromObject(object.vindexes[i]); + } + } + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".vtctldata.LookupVindexCreateParams.cells: array expected"); + message.cells = []; + for (let i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } + if (object.tablet_types) { + if (!Array.isArray(object.tablet_types)) + throw TypeError(".vtctldata.LookupVindexCreateParams.tablet_types: array expected"); + message.tablet_types = []; + for (let i = 0; i < object.tablet_types.length; ++i) + switch (object.tablet_types[i]) { + default: + if (typeof object.tablet_types[i] === "number") { + message.tablet_types[i] = object.tablet_types[i]; + break; + } + case "UNKNOWN": + case 0: + message.tablet_types[i] = 0; + break; + case "PRIMARY": + case 1: + message.tablet_types[i] = 1; + break; + case "MASTER": + case 1: + message.tablet_types[i] = 1; + break; + case "REPLICA": + case 2: + message.tablet_types[i] = 2; + break; + case "RDONLY": + case 3: + message.tablet_types[i] = 3; + break; + case "BATCH": + case 3: + message.tablet_types[i] = 3; + break; + case "SPARE": + case 4: + message.tablet_types[i] = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_types[i] = 5; + break; + case "BACKUP": + case 6: + message.tablet_types[i] = 6; + break; + case "RESTORE": + case 7: + message.tablet_types[i] = 7; + break; + case "DRAINED": + case 8: + message.tablet_types[i] = 8; + break; + } + } + if (object.continue_after_copy_with_owner != null) + message.continue_after_copy_with_owner = Boolean(object.continue_after_copy_with_owner); + if (object.tablet_types_in_preference_order != null) + message.tablet_types_in_preference_order = Boolean(object.tablet_types_in_preference_order); + return message; + }; + + /** + * Creates a plain object from a LookupVindexCreateParams message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {vtctldata.LookupVindexCreateParams} message LookupVindexCreateParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookupVindexCreateParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.vindexes = []; + object.cells = []; + object.tablet_types = []; + } + if (options.defaults) + object.keyspace = ""; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.vindexes && message.vindexes.length) { + object.vindexes = []; + for (let j = 0; j < message.vindexes.length; ++j) + object.vindexes[j] = $root.vtctldata.VindexParams.toObject(message.vindexes[j], options); + } + if (message.cells && message.cells.length) { + object.cells = []; + for (let j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; + } + if (message.tablet_types && message.tablet_types.length) { + object.tablet_types = []; + for (let j = 0; j < message.tablet_types.length; ++j) + object.tablet_types[j] = options.enums === String ? $root.topodata.TabletType[message.tablet_types[j]] === undefined ? message.tablet_types[j] : $root.topodata.TabletType[message.tablet_types[j]] : message.tablet_types[j]; + } + if (message.continue_after_copy_with_owner != null && message.hasOwnProperty("continue_after_copy_with_owner")) { + object.continue_after_copy_with_owner = message.continue_after_copy_with_owner; + if (options.oneofs) + object._continue_after_copy_with_owner = "continue_after_copy_with_owner"; + } + if (message.tablet_types_in_preference_order != null && message.hasOwnProperty("tablet_types_in_preference_order")) { + object.tablet_types_in_preference_order = message.tablet_types_in_preference_order; + if (options.oneofs) + object._tablet_types_in_preference_order = "tablet_types_in_preference_order"; + } + return object; + }; + + /** + * Converts this LookupVindexCreateParams to JSON. + * @function toJSON + * @memberof vtctldata.LookupVindexCreateParams + * @instance + * @returns {Object.} JSON object + */ + LookupVindexCreateParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookupVindexCreateParams + * @function getTypeUrl + * @memberof vtctldata.LookupVindexCreateParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookupVindexCreateParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.LookupVindexCreateParams"; + }; + + return LookupVindexCreateParams; + })(); + + vtctldata.VindexParams = (function() { + + /** + * Properties of a VindexParams. + * @memberof vtctldata + * @interface IVindexParams + * @property {string|null} [name] VindexParams name + * @property {string|null} [lookup_vindex_type] VindexParams lookup_vindex_type + * @property {string|null} [table_owner] VindexParams table_owner + * @property {Array.|null} [table_owner_columns] VindexParams table_owner_columns + * @property {string|null} [table_name] VindexParams table_name + * @property {boolean|null} [ignore_nulls] VindexParams ignore_nulls + * @property {string|null} [table_vindex_type] VindexParams table_vindex_type + */ + + /** + * Constructs a new VindexParams. + * @memberof vtctldata + * @classdesc Represents a VindexParams. + * @implements IVindexParams + * @constructor + * @param {vtctldata.IVindexParams=} [properties] Properties to set + */ + function VindexParams(properties) { + this.table_owner_columns = []; + 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]]; + } + + /** + * VindexParams name. + * @member {string} name + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.name = ""; + + /** + * VindexParams lookup_vindex_type. + * @member {string} lookup_vindex_type + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.lookup_vindex_type = ""; + + /** + * VindexParams table_owner. + * @member {string} table_owner + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.table_owner = ""; + + /** + * VindexParams table_owner_columns. + * @member {Array.} table_owner_columns + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.table_owner_columns = $util.emptyArray; + + /** + * VindexParams table_name. + * @member {string} table_name + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.table_name = ""; + + /** + * VindexParams ignore_nulls. + * @member {boolean} ignore_nulls + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.ignore_nulls = false; + + /** + * VindexParams table_vindex_type. + * @member {string} table_vindex_type + * @memberof vtctldata.VindexParams + * @instance + */ + VindexParams.prototype.table_vindex_type = ""; + + /** + * Creates a new VindexParams instance using the specified properties. + * @function create + * @memberof vtctldata.VindexParams + * @static + * @param {vtctldata.IVindexParams=} [properties] Properties to set + * @returns {vtctldata.VindexParams} VindexParams instance + */ + VindexParams.create = function create(properties) { + return new VindexParams(properties); + }; + + /** + * Encodes the specified VindexParams message. Does not implicitly {@link vtctldata.VindexParams.verify|verify} messages. + * @function encode + * @memberof vtctldata.VindexParams + * @static + * @param {vtctldata.IVindexParams} message VindexParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VindexParams.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.lookup_vindex_type != null && Object.hasOwnProperty.call(message, "lookup_vindex_type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lookup_vindex_type); + if (message.table_owner != null && Object.hasOwnProperty.call(message, "table_owner")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.table_owner); + if (message.table_owner_columns != null && message.table_owner_columns.length) + for (let i = 0; i < message.table_owner_columns.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.table_owner_columns[i]); + if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.table_name); + if (message.ignore_nulls != null && Object.hasOwnProperty.call(message, "ignore_nulls")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ignore_nulls); + if (message.table_vindex_type != null && Object.hasOwnProperty.call(message, "table_vindex_type")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.table_vindex_type); + return writer; + }; + + /** + * Encodes the specified VindexParams message, length delimited. Does not implicitly {@link vtctldata.VindexParams.verify|verify} messages. + * @function encodeDelimited + * @memberof vtctldata.VindexParams + * @static + * @param {vtctldata.IVindexParams} message VindexParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VindexParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VindexParams message from the specified reader or buffer. + * @function decode + * @memberof vtctldata.VindexParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtctldata.VindexParams} VindexParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VindexParams.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.vtctldata.VindexParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.lookup_vindex_type = reader.string(); + break; + } + case 3: { + message.table_owner = reader.string(); + break; + } + case 4: { + if (!(message.table_owner_columns && message.table_owner_columns.length)) + message.table_owner_columns = []; + message.table_owner_columns.push(reader.string()); + break; + } + case 5: { + message.table_name = reader.string(); + break; + } + case 6: { + message.ignore_nulls = reader.bool(); + break; + } + case 7: { + message.table_vindex_type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VindexParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtctldata.VindexParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtctldata.VindexParams} VindexParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VindexParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VindexParams message. + * @function verify + * @memberof vtctldata.VindexParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VindexParams.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.lookup_vindex_type != null && message.hasOwnProperty("lookup_vindex_type")) + if (!$util.isString(message.lookup_vindex_type)) + return "lookup_vindex_type: string expected"; + if (message.table_owner != null && message.hasOwnProperty("table_owner")) + if (!$util.isString(message.table_owner)) + return "table_owner: string expected"; + if (message.table_owner_columns != null && message.hasOwnProperty("table_owner_columns")) { + if (!Array.isArray(message.table_owner_columns)) + return "table_owner_columns: array expected"; + for (let i = 0; i < message.table_owner_columns.length; ++i) + if (!$util.isString(message.table_owner_columns[i])) + return "table_owner_columns: string[] expected"; + } + if (message.table_name != null && message.hasOwnProperty("table_name")) + if (!$util.isString(message.table_name)) + return "table_name: string expected"; + if (message.ignore_nulls != null && message.hasOwnProperty("ignore_nulls")) + if (typeof message.ignore_nulls !== "boolean") + return "ignore_nulls: boolean expected"; + if (message.table_vindex_type != null && message.hasOwnProperty("table_vindex_type")) + if (!$util.isString(message.table_vindex_type)) + return "table_vindex_type: string expected"; + return null; + }; + + /** + * Creates a VindexParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtctldata.VindexParams + * @static + * @param {Object.} object Plain object + * @returns {vtctldata.VindexParams} VindexParams + */ + VindexParams.fromObject = function fromObject(object) { + if (object instanceof $root.vtctldata.VindexParams) + return object; + let message = new $root.vtctldata.VindexParams(); + if (object.name != null) + message.name = String(object.name); + if (object.lookup_vindex_type != null) + message.lookup_vindex_type = String(object.lookup_vindex_type); + if (object.table_owner != null) + message.table_owner = String(object.table_owner); + if (object.table_owner_columns) { + if (!Array.isArray(object.table_owner_columns)) + throw TypeError(".vtctldata.VindexParams.table_owner_columns: array expected"); + message.table_owner_columns = []; + for (let i = 0; i < object.table_owner_columns.length; ++i) + message.table_owner_columns[i] = String(object.table_owner_columns[i]); + } + if (object.table_name != null) + message.table_name = String(object.table_name); + if (object.ignore_nulls != null) + message.ignore_nulls = Boolean(object.ignore_nulls); + if (object.table_vindex_type != null) + message.table_vindex_type = String(object.table_vindex_type); + return message; + }; + + /** + * Creates a plain object from a VindexParams message. Also converts values to other types if specified. + * @function toObject + * @memberof vtctldata.VindexParams + * @static + * @param {vtctldata.VindexParams} message VindexParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VindexParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.table_owner_columns = []; + if (options.defaults) { + object.name = ""; + object.lookup_vindex_type = ""; + object.table_owner = ""; + object.table_name = ""; + object.ignore_nulls = false; + object.table_vindex_type = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lookup_vindex_type != null && message.hasOwnProperty("lookup_vindex_type")) + object.lookup_vindex_type = message.lookup_vindex_type; + if (message.table_owner != null && message.hasOwnProperty("table_owner")) + object.table_owner = message.table_owner; + if (message.table_owner_columns && message.table_owner_columns.length) { + object.table_owner_columns = []; + for (let j = 0; j < message.table_owner_columns.length; ++j) + object.table_owner_columns[j] = message.table_owner_columns[j]; + } + if (message.table_name != null && message.hasOwnProperty("table_name")) + object.table_name = message.table_name; + if (message.ignore_nulls != null && message.hasOwnProperty("ignore_nulls")) + object.ignore_nulls = message.ignore_nulls; + if (message.table_vindex_type != null && message.hasOwnProperty("table_vindex_type")) + object.table_vindex_type = message.table_vindex_type; + return object; + }; + + /** + * Converts this VindexParams to JSON. + * @function toJSON + * @memberof vtctldata.VindexParams + * @instance + * @returns {Object.} JSON object + */ + VindexParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VindexParams + * @function getTypeUrl + * @memberof vtctldata.VindexParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VindexParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/vtctldata.VindexParams"; + }; + + return VindexParams; + })(); + return vtctldata; })();