From 646bfd41c1fdfd52c79bc6ce31f6d42c94069e36 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Fri, 13 Sep 2024 16:32:35 -0400 Subject: [PATCH] VReplication: Replace most usage of SimulatedNulls (#16734) Signed-off-by: Matt Lord --- .../command/vreplication/common/update.go | 10 +- .../command/vreplication/workflow/state.go | 6 +- .../command/vreplication/workflow/update.go | 25 +- go/test/endtoend/vreplication/vdiff2_test.go | 4 +- go/textutil/strings.go | 30 +- go/textutil/strings_test.go | 41 +- .../tabletmanagerdata/tabletmanagerdata.pb.go | 558 +++++++++--------- .../tabletmanagerdata_vtproto.pb.go | 112 ++-- go/vt/vtadmin/api.go | 21 +- go/vt/vtctl/vtctl.go | 10 +- go/vt/vtctl/workflow/materializer.go | 11 +- go/vt/vtctl/workflow/resharder.go | 7 +- .../tabletmanager/rpc_vreplication.go | 39 +- .../tabletmanager/rpc_vreplication_test.go | 90 ++- .../tabletmanager/vdiff/action_test.go | 4 +- go/vt/wrangler/vexec.go | 4 +- go/vt/wrangler/vexec_test.go | 28 +- proto/tabletmanagerdata.proto | 12 +- web/vtadmin/src/proto/vtadmin.d.ts | 30 +- web/vtadmin/src/proto/vtadmin.js | 164 +++-- 20 files changed, 652 insertions(+), 554 deletions(-) diff --git a/go/cmd/vtctldclient/command/vreplication/common/update.go b/go/cmd/vtctldclient/command/vreplication/common/update.go index 7875c9412ac..896d417d8db 100644 --- a/go/cmd/vtctldclient/command/vreplication/common/update.go +++ b/go/cmd/vtctldclient/command/vreplication/common/update.go @@ -21,13 +21,12 @@ import ( "sort" "strings" - "vitess.io/vitess/go/vt/proto/vtrpc" - "vitess.io/vitess/go/vt/vterrors" - "github.com/spf13/cobra" "vitess.io/vitess/go/cmd/vtctldclient/cli" "vitess.io/vitess/go/textutil" + "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" @@ -143,9 +142,8 @@ func commandUpdateState(cmd *cobra.Command, args []string) error { TabletRequest: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflowUpdateOptions.Workflow, Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), - State: state, + TabletTypes: textutil.SimulatedNullTabletTypeSlice, + State: &state, }, } diff --git a/go/cmd/vtctldclient/command/vreplication/workflow/state.go b/go/cmd/vtctldclient/command/vreplication/workflow/state.go index 89e75312ab2..c10e50f403c 100644 --- a/go/cmd/vtctldclient/command/vreplication/workflow/state.go +++ b/go/cmd/vtctldclient/command/vreplication/workflow/state.go @@ -29,7 +29,6 @@ import ( binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) @@ -79,9 +78,8 @@ func commandUpdateState(cmd *cobra.Command, args []string) error { TabletRequest: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: baseOptions.Workflow, Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), - State: state, + TabletTypes: textutil.SimulatedNullTabletTypeSlice, + State: &state, }, } diff --git a/go/cmd/vtctldclient/command/vreplication/workflow/update.go b/go/cmd/vtctldclient/command/vreplication/workflow/update.go index 3d06ad3e64e..08f71cc7d7b 100644 --- a/go/cmd/vtctldclient/command/vreplication/workflow/update.go +++ b/go/cmd/vtctldclient/command/vreplication/workflow/update.go @@ -25,6 +25,7 @@ import ( "vitess.io/vitess/go/cmd/vtctldclient/cli" "vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/textutil" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" @@ -65,14 +66,14 @@ var ( } changes = true } else { - updateOptions.TabletTypes = []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)} + updateOptions.TabletTypes = textutil.SimulatedNullTabletTypeSlice } if cmd.Flags().Lookup("on-ddl").Changed { // Validate the provided value changes = true if _, ok := binlogdatapb.OnDDLAction_value[strings.ToUpper(updateOptions.OnDDL)]; !ok { return fmt.Errorf("invalid on-ddl value: %s", updateOptions.OnDDL) } - } // Simulated NULL will need to be handled in command + } if !changes { return fmt.Errorf("no configuration options specified to update") } @@ -85,15 +86,6 @@ var ( func commandUpdate(cmd *cobra.Command, args []string) error { cli.FinishedParsing(cmd) - // We've already validated any provided value, if one WAS provided. - // Now we need to do the mapping from the string representation to - // the enum value. - onddl := int32(textutil.SimulatedNullInt) // Simulated NULL when no value provided - if val, ok := binlogdatapb.OnDDLAction_value[strings.ToUpper(updateOptions.OnDDL)]; ok { - onddl = val - } - - // Simulated NULL when no value is provided. tsp := tabletmanagerdatapb.TabletSelectionPreference_UNKNOWN if cmd.Flags().Lookup("tablet-types-in-order").Changed { if updateOptions.TabletTypesInPreferenceOrder { @@ -109,12 +101,17 @@ func commandUpdate(cmd *cobra.Command, args []string) error { Workflow: baseOptions.Workflow, Cells: updateOptions.Cells, TabletTypes: updateOptions.TabletTypes, - TabletSelectionPreference: tsp, - OnDdl: binlogdatapb.OnDDLAction(onddl), - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), // We don't allow changing this in the client command + TabletSelectionPreference: &tsp, }, } + // We've already validated any provided value, if one WAS provided. + // Now we need to do the mapping from the string representation to + // the enum value. + if val, ok := binlogdatapb.OnDDLAction_value[strings.ToUpper(updateOptions.OnDDL)]; ok { + req.TabletRequest.OnDdl = ptr.Of(binlogdatapb.OnDDLAction(val)) + } + resp, err := common.GetClient().WorkflowUpdate(common.GetCommandCtx(), req) if err != nil { return err diff --git a/go/test/endtoend/vreplication/vdiff2_test.go b/go/test/endtoend/vreplication/vdiff2_test.go index d6602502be0..569806f24a4 100644 --- a/go/test/endtoend/vreplication/vdiff2_test.go +++ b/go/test/endtoend/vreplication/vdiff2_test.go @@ -32,6 +32,7 @@ import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/sqlparser" @@ -370,7 +371,6 @@ func testCLIErrors(t *testing.T, ksWorkflow, cells string) { // testCLIFlagHandling tests that the vtctldclient CLI flags are handled correctly // from vtctldclient->vtctld->vttablet->mysqld. func testCLIFlagHandling(t *testing.T, targetKs, workflowName string, cell *Cell) { - false := false expectedOptions := &tabletmanagerdatapb.VDiffOptions{ CoreOptions: &tabletmanagerdatapb.VDiffCoreOptions{ MaxRows: 999, @@ -379,7 +379,7 @@ func testCLIFlagHandling(t *testing.T, targetKs, workflowName string, cell *Cell UpdateTableStats: true, TimeoutSeconds: 60, MaxDiffSeconds: 333, - AutoStart: &false, + AutoStart: ptr.Of(false), }, PickerOptions: &tabletmanagerdatapb.VDiffPickerOptions{ SourceCell: "zone1,zone2,zone3,zonefoosource", diff --git a/go/textutil/strings.go b/go/textutil/strings.go index 616366f0083..2a923cd3259 100644 --- a/go/textutil/strings.go +++ b/go/textutil/strings.go @@ -25,7 +25,6 @@ import ( "vitess.io/vitess/go/sqltypes" - binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -37,10 +36,10 @@ const ( ) var ( - delimitedListRegexp = regexp.MustCompile(`[ ,;]+`) - SimulatedNullString = sqltypes.NULL.String() - SimulatedNullStringSlice = []string{sqltypes.NULL.String()} - SimulatedNullInt = -1 + delimitedListRegexp = regexp.MustCompile(`[ ,;]+`) + SimulatedNullStringSlice = []string{sqltypes.NULL.String()} + SimulatedNullTabletTypeSlice = []topodatapb.TabletType{topodatapb.TabletType(SimulatedNullInt)} + SimulatedNullInt = -1 ) // SplitDelimitedList splits a given string by comma, semi-colon or space, and returns non-empty strings @@ -91,29 +90,16 @@ func SingleWordCamel(w string) string { return strings.ToUpper(w[0:1]) + strings.ToLower(w[1:]) } -// ValueIsSimulatedNull returns true if the value represents -// a NULL or unknown/unspecified value. This is used to -// distinguish between a zero value / default and a user -// provided value that is equivalent (e.g. an empty string -// or slice). +// ValueIsSimulatedNull returns true if the slice value represents +// a NULL or unknown/unspecified value. This is used to distinguish +// between a zero value empty slice and a user provided value of an +// empty slice. func ValueIsSimulatedNull(val any) bool { switch cval := val.(type) { - case string: - return cval == SimulatedNullString case []string: return len(cval) == 1 && cval[0] == sqltypes.NULL.String() - case binlogdatapb.OnDDLAction: - return int32(cval) == int32(SimulatedNullInt) - case int: - return cval == SimulatedNullInt - case int32: - return int32(cval) == int32(SimulatedNullInt) - case int64: - return int64(cval) == int64(SimulatedNullInt) case []topodatapb.TabletType: return len(cval) == 1 && cval[0] == topodatapb.TabletType(SimulatedNullInt) - case binlogdatapb.VReplicationWorkflowState: - return int32(cval) == int32(SimulatedNullInt) default: return false } diff --git a/go/textutil/strings_test.go b/go/textutil/strings_test.go index 2ba9851b71c..d65c187c4cb 100644 --- a/go/textutil/strings_test.go +++ b/go/textutil/strings_test.go @@ -23,6 +23,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "vitess.io/vitess/go/sqltypes" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -131,40 +133,25 @@ func TestValueIsSimulatedNull(t *testing.T) { val: "test", isNull: false, }, - { - name: "case string true", - val: SimulatedNullString, - isNull: true, - }, { name: "case []string true", - val: []string{SimulatedNullString}, + val: []string{sqltypes.NULL.String()}, isNull: true, }, { name: "case []string false", - val: []string{SimulatedNullString, SimulatedNullString}, + val: []string{sqltypes.NULL.String(), sqltypes.NULL.String()}, isNull: false, }, { - name: "case binlogdatapb.OnDDLAction true", - val: binlogdatapb.OnDDLAction(SimulatedNullInt), - isNull: true, - }, - { - name: "case int true", - val: SimulatedNullInt, - isNull: true, - }, - { - name: "case int32 true", - val: int32(SimulatedNullInt), - isNull: true, + name: "case binlogdatapb.OnDDLAction exec", + val: binlogdatapb.OnDDLAction_EXEC, + isNull: false, }, { - name: "case int64 true", - val: int64(SimulatedNullInt), - isNull: true, + name: "case int false", + val: 1, + isNull: false, }, { name: "case []topodatapb.TabletType true", @@ -172,12 +159,12 @@ func TestValueIsSimulatedNull(t *testing.T) { isNull: true, }, { - name: "case binlogdatapb.VReplicationWorkflowState true", - val: binlogdatapb.VReplicationWorkflowState(SimulatedNullInt), - isNull: true, + name: "case binlogdatapb.VReplicationWorkflowState running", + val: binlogdatapb.VReplicationWorkflowState_Running, + isNull: false, }, { - name: "case default", + name: "case float false", val: float64(1), isNull: false, }, diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index beb3e2c3e1d..bf8a8e92ed3 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -6337,12 +6337,12 @@ type UpdateVReplicationWorkflowRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` - Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"` - TabletTypes []topodata.TabletType `protobuf:"varint,3,rep,packed,name=tablet_types,json=tabletTypes,proto3,enum=topodata.TabletType" json:"tablet_types,omitempty"` - TabletSelectionPreference TabletSelectionPreference `protobuf:"varint,4,opt,name=tablet_selection_preference,json=tabletSelectionPreference,proto3,enum=tabletmanagerdata.TabletSelectionPreference" json:"tablet_selection_preference,omitempty"` - OnDdl binlogdata.OnDDLAction `protobuf:"varint,5,opt,name=on_ddl,json=onDdl,proto3,enum=binlogdata.OnDDLAction" json:"on_ddl,omitempty"` - State binlogdata.VReplicationWorkflowState `protobuf:"varint,6,opt,name=state,proto3,enum=binlogdata.VReplicationWorkflowState" json:"state,omitempty"` + Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"` + TabletTypes []topodata.TabletType `protobuf:"varint,3,rep,packed,name=tablet_types,json=tabletTypes,proto3,enum=topodata.TabletType" json:"tablet_types,omitempty"` + TabletSelectionPreference *TabletSelectionPreference `protobuf:"varint,4,opt,name=tablet_selection_preference,json=tabletSelectionPreference,proto3,enum=tabletmanagerdata.TabletSelectionPreference,oneof" json:"tablet_selection_preference,omitempty"` + OnDdl *binlogdata.OnDDLAction `protobuf:"varint,5,opt,name=on_ddl,json=onDdl,proto3,enum=binlogdata.OnDDLAction,oneof" json:"on_ddl,omitempty"` + State *binlogdata.VReplicationWorkflowState `protobuf:"varint,6,opt,name=state,proto3,enum=binlogdata.VReplicationWorkflowState,oneof" json:"state,omitempty"` } func (x *UpdateVReplicationWorkflowRequest) Reset() { @@ -6399,22 +6399,22 @@ func (x *UpdateVReplicationWorkflowRequest) GetTabletTypes() []topodata.TabletTy } func (x *UpdateVReplicationWorkflowRequest) GetTabletSelectionPreference() TabletSelectionPreference { - if x != nil { - return x.TabletSelectionPreference + if x != nil && x.TabletSelectionPreference != nil { + return *x.TabletSelectionPreference } return TabletSelectionPreference_ANY } func (x *UpdateVReplicationWorkflowRequest) GetOnDdl() binlogdata.OnDDLAction { - if x != nil { - return x.OnDdl + if x != nil && x.OnDdl != nil { + return *x.OnDdl } return binlogdata.OnDDLAction(0) } func (x *UpdateVReplicationWorkflowRequest) GetState() binlogdata.VReplicationWorkflowState { - if x != nil { - return x.State + if x != nil && x.State != nil { + return *x.State } return binlogdata.VReplicationWorkflowState(0) } @@ -6477,12 +6477,12 @@ type UpdateVReplicationWorkflowsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AllWorkflows bool `protobuf:"varint,1,opt,name=all_workflows,json=allWorkflows,proto3" json:"all_workflows,omitempty"` - IncludeWorkflows []string `protobuf:"bytes,2,rep,name=include_workflows,json=includeWorkflows,proto3" json:"include_workflows,omitempty"` - ExcludeWorkflows []string `protobuf:"bytes,3,rep,name=exclude_workflows,json=excludeWorkflows,proto3" json:"exclude_workflows,omitempty"` - State binlogdata.VReplicationWorkflowState `protobuf:"varint,4,opt,name=state,proto3,enum=binlogdata.VReplicationWorkflowState" json:"state,omitempty"` - Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` - StopPosition string `protobuf:"bytes,6,opt,name=stop_position,json=stopPosition,proto3" json:"stop_position,omitempty"` + AllWorkflows bool `protobuf:"varint,1,opt,name=all_workflows,json=allWorkflows,proto3" json:"all_workflows,omitempty"` + IncludeWorkflows []string `protobuf:"bytes,2,rep,name=include_workflows,json=includeWorkflows,proto3" json:"include_workflows,omitempty"` + ExcludeWorkflows []string `protobuf:"bytes,3,rep,name=exclude_workflows,json=excludeWorkflows,proto3" json:"exclude_workflows,omitempty"` + State *binlogdata.VReplicationWorkflowState `protobuf:"varint,4,opt,name=state,proto3,enum=binlogdata.VReplicationWorkflowState,oneof" json:"state,omitempty"` + Message *string `protobuf:"bytes,5,opt,name=message,proto3,oneof" json:"message,omitempty"` + StopPosition *string `protobuf:"bytes,6,opt,name=stop_position,json=stopPosition,proto3,oneof" json:"stop_position,omitempty"` } func (x *UpdateVReplicationWorkflowsRequest) Reset() { @@ -6539,22 +6539,22 @@ func (x *UpdateVReplicationWorkflowsRequest) GetExcludeWorkflows() []string { } func (x *UpdateVReplicationWorkflowsRequest) GetState() binlogdata.VReplicationWorkflowState { - if x != nil { - return x.State + if x != nil && x.State != nil { + return *x.State } return binlogdata.VReplicationWorkflowState(0) } func (x *UpdateVReplicationWorkflowsRequest) GetMessage() string { - if x != nil { - return x.Message + if x != nil && x.Message != nil { + return *x.Message } return "" } func (x *UpdateVReplicationWorkflowsRequest) GetStopPosition() string { - if x != nil { - return x.StopPosition + if x != nil && x.StopPosition != nil { + return *x.StopPosition } return "" } @@ -8361,7 +8361,7 @@ var file_tabletmanagerdata_proto_rawDesc = []byte{ 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xef, 0x02, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, 0x70, + 0x73, 0x22, 0xb3, 0x03, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, @@ -8370,267 +8370,275 @@ var file_tabletmanagerdata_proto_rawDesc = []byte{ 0x6c, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 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, 0x6c, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, + 0x65, 0x73, 0x12, 0x71, 0x0a, 0x1b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x12, 0x2e, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x17, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4f, 0x6e, - 0x44, 0x44, 0x4c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, - 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x25, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x4a, 0x04, 0x08, - 0x07, 0x10, 0x08, 0x22, 0x50, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x4f, 0x6e, 0x44, 0x44, 0x4c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, + 0x52, 0x05, 0x6f, 0x6e, 0x44, 0x64, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x62, 0x69, 0x6e, 0x6c, + 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x48, 0x02, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x1e, 0x0a, 0x1c, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x6e, 0x5f, 0x64, 0x64, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x50, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x02, 0x0a, 0x22, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, + 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, + 0x2e, 0x62, 0x69, 0x6e, 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x9f, 0x02, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, - 0x61, 0x6c, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x2b, - 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x62, 0x69, 0x6e, - 0x6c, 0x6f, 0x67, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x56, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2f, 0x0a, 0x15, 0x52, 0x65, - 0x73, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x12, 0x36, 0x0a, 0x17, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6f, 0x6b, 0x5f, 0x69, - 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x9f, 0x06, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, - 0x79, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0f, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, - 0x12, 0x50, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x36, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, - 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x8b, 0x02, 0x0a, 0x06, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2f, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xdd, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, + 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x73, + 0x6b, 0x69, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, + 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x6b, + 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6f, 0x6b, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, + 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x22, 0x9f, 0x06, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x07, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x6c, 0x0a, 0x0c, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, - 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0xb6, 0x10, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x8b, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x6c, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, + 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0xb6, 0x10, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, + 0x61, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x69, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, + 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x44, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x67, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x3c, + 0x0a, 0x1b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x75, 0x73, + 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x17, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x55, + 0x73, 0x65, 0x64, 0x41, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x73, 0x0a, 0x12, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x12, 0x70, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x10, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x73, 0x12, 0x67, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x67, 0x0a, 0x0e, + 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x0f, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6c, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x1d, - 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, - 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x1b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x4e, 0x61, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x64, 0x41, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x12, 0x73, 0x0a, 0x12, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x70, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x67, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x40, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x12, 0x67, 0x0a, 0x0e, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x61, - 0x70, 0x70, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, - 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x68, 0x72, - 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x12, 0x74, 0x0a, 0x13, 0x61, 0x70, - 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, - 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, - 0x6e, 0x74, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x0b, 0x72, - 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x3d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x80, 0x01, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, + 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, + 0x64, 0x41, 0x70, 0x70, 0x73, 0x12, 0x74, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x10, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, + 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, 0x70, 0x70, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, + 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, + 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, + 0x74, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x41, 0x70, 0x70, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x1a, 0x80, 0x01, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x81, 0x01, 0x0a, 0x0c, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x0f, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x61, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x41, + 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x69, 0x6e, + 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x53, 0x69, + 0x6e, 0x63, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x1a, 0x7c, + 0x0a, 0x12, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, + 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5c, 0x0a, 0x12, + 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, - 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x45, 0x6e, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x41, 0x70, + 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0xad, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x12, 0x2b, + 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x52, 0x0a, 0x0d, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, + 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x1a, 0x76, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x81, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x12, 0x34, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, - 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x79, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x79, 0x1a, 0x7c, 0x0a, 0x12, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x5c, 0x0a, 0x12, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, - 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x41, 0x70, 0x70, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x44, 0x0a, 0x16, 0x41, 0x70, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xad, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, - 0x41, 0x70, 0x70, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x74, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x65, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x6f, + 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3e, 0x0a, 0x19, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x49, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x2a, 0x83, 0x01, 0x0a, 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x76, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, - 0x70, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x41, - 0x70, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3e, 0x0a, - 0x19, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, - 0x59, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x2a, 0x83, 0x01, - 0x0a, 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0d, 0x0a, 0x09, - 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, - 0x4b, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, - 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, - 0x50, 0x50, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x04, 0x12, - 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x10, 0x05, 0x42, 0x30, 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, - 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, + 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x16, + 0x0a, 0x12, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x5f, 0x45, 0x58, 0x43, 0x45, + 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, + 0x4e, 0x49, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x30, + 0x5a, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, + 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10516,6 +10524,8 @@ func file_tabletmanagerdata_proto_init() { } } file_tabletmanagerdata_proto_msgTypes[116].OneofWrappers = []any{} + file_tabletmanagerdata_proto_msgTypes[118].OneofWrappers = []any{} + file_tabletmanagerdata_proto_msgTypes[120].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go index 536e9c177f8..58087eb3aa6 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go @@ -2318,9 +2318,6 @@ func (m *UpdateVReplicationWorkflowRequest) CloneVT() *UpdateVReplicationWorkflo } r := new(UpdateVReplicationWorkflowRequest) r.Workflow = m.Workflow - r.TabletSelectionPreference = m.TabletSelectionPreference - r.OnDdl = m.OnDdl - r.State = m.State if rhs := m.Cells; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -2331,6 +2328,18 @@ func (m *UpdateVReplicationWorkflowRequest) CloneVT() *UpdateVReplicationWorkflo copy(tmpContainer, rhs) r.TabletTypes = tmpContainer } + if rhs := m.TabletSelectionPreference; rhs != nil { + tmpVal := *rhs + r.TabletSelectionPreference = &tmpVal + } + if rhs := m.OnDdl; rhs != nil { + tmpVal := *rhs + r.OnDdl = &tmpVal + } + if rhs := m.State; rhs != nil { + tmpVal := *rhs + r.State = &tmpVal + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -2365,9 +2374,6 @@ func (m *UpdateVReplicationWorkflowsRequest) CloneVT() *UpdateVReplicationWorkfl } r := new(UpdateVReplicationWorkflowsRequest) r.AllWorkflows = m.AllWorkflows - r.State = m.State - r.Message = m.Message - r.StopPosition = m.StopPosition if rhs := m.IncludeWorkflows; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -2378,6 +2384,18 @@ func (m *UpdateVReplicationWorkflowsRequest) CloneVT() *UpdateVReplicationWorkfl copy(tmpContainer, rhs) r.ExcludeWorkflows = tmpContainer } + if rhs := m.State; rhs != nil { + tmpVal := *rhs + r.State = &tmpVal + } + if rhs := m.Message; rhs != nil { + tmpVal := *rhs + r.Message = &tmpVal + } + if rhs := m.StopPosition; rhs != nil { + tmpVal := *rhs + r.StopPosition = &tmpVal + } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -8414,18 +8432,18 @@ func (m *UpdateVReplicationWorkflowRequest) MarshalToSizedBufferVT(dAtA []byte) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.State != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.State)) + if m.State != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.State)) i-- dAtA[i] = 0x30 } - if m.OnDdl != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OnDdl)) + if m.OnDdl != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.OnDdl)) i-- dAtA[i] = 0x28 } - if m.TabletSelectionPreference != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TabletSelectionPreference)) + if m.TabletSelectionPreference != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.TabletSelectionPreference)) i-- dAtA[i] = 0x20 } @@ -8542,22 +8560,22 @@ func (m *UpdateVReplicationWorkflowsRequest) MarshalToSizedBufferVT(dAtA []byte) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.StopPosition) > 0 { - i -= len(m.StopPosition) - copy(dAtA[i:], m.StopPosition) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StopPosition))) + if m.StopPosition != nil { + i -= len(*m.StopPosition) + copy(dAtA[i:], *m.StopPosition) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.StopPosition))) i-- dAtA[i] = 0x32 } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + if m.Message != nil { + i -= len(*m.Message) + copy(dAtA[i:], *m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Message))) i-- dAtA[i] = 0x2a } - if m.State != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.State)) + if m.State != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.State)) i-- dAtA[i] = 0x20 } @@ -11474,14 +11492,14 @@ func (m *UpdateVReplicationWorkflowRequest) SizeVT() (n int) { } n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } - if m.TabletSelectionPreference != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.TabletSelectionPreference)) + if m.TabletSelectionPreference != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.TabletSelectionPreference)) } - if m.OnDdl != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.OnDdl)) + if m.OnDdl != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.OnDdl)) } - if m.State != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.State)) + if m.State != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.State)) } n += len(m.unknownFields) return n @@ -11522,15 +11540,15 @@ func (m *UpdateVReplicationWorkflowsRequest) SizeVT() (n int) { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } - if m.State != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.State)) + if m.State != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.State)) } - l = len(m.Message) - if l > 0 { + if m.Message != nil { + l = len(*m.Message) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - l = len(m.StopPosition) - if l > 0 { + if m.StopPosition != nil { + l = len(*m.StopPosition) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) @@ -24614,7 +24632,7 @@ func (m *UpdateVReplicationWorkflowRequest) UnmarshalVT(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TabletSelectionPreference", wireType) } - m.TabletSelectionPreference = 0 + var v TabletSelectionPreference for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -24624,16 +24642,17 @@ func (m *UpdateVReplicationWorkflowRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TabletSelectionPreference |= TabletSelectionPreference(b&0x7F) << shift + v |= TabletSelectionPreference(b&0x7F) << shift if b < 0x80 { break } } + m.TabletSelectionPreference = &v case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OnDdl", wireType) } - m.OnDdl = 0 + var v binlogdata.OnDDLAction for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -24643,16 +24662,17 @@ func (m *UpdateVReplicationWorkflowRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.OnDdl |= binlogdata.OnDDLAction(b&0x7F) << shift + v |= binlogdata.OnDDLAction(b&0x7F) << shift if b < 0x80 { break } } + m.OnDdl = &v case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } - m.State = 0 + var v binlogdata.VReplicationWorkflowState for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -24662,11 +24682,12 @@ func (m *UpdateVReplicationWorkflowRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= binlogdata.VReplicationWorkflowState(b&0x7F) << shift + v |= binlogdata.VReplicationWorkflowState(b&0x7F) << shift if b < 0x80 { break } } + m.State = &v default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -24893,7 +24914,7 @@ func (m *UpdateVReplicationWorkflowsRequest) UnmarshalVT(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } - m.State = 0 + var v binlogdata.VReplicationWorkflowState for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -24903,11 +24924,12 @@ func (m *UpdateVReplicationWorkflowsRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= binlogdata.VReplicationWorkflowState(b&0x7F) << shift + v |= binlogdata.VReplicationWorkflowState(b&0x7F) << shift if b < 0x80 { break } } + m.State = &v case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) @@ -24938,7 +24960,8 @@ func (m *UpdateVReplicationWorkflowsRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.Message = &s iNdEx = postIndex case 6: if wireType != 2 { @@ -24970,7 +24993,8 @@ func (m *UpdateVReplicationWorkflowsRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.StopPosition = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.StopPosition = &s iNdEx = postIndex default: iNdEx = preIndex diff --git a/go/vt/vtadmin/api.go b/go/vt/vtadmin/api.go index 530b57ccdee..379925edd0b 100644 --- a/go/vt/vtadmin/api.go +++ b/go/vt/vtadmin/api.go @@ -33,11 +33,9 @@ import ( "github.com/patrickmn/go-cache" vreplcommon "vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common" - "vitess.io/vitess/go/stats" - "vitess.io/vitess/go/textutil" - "vitess.io/vitess/go/vt/vtenv" - + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/sets" + "vitess.io/vitess/go/stats" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/log" @@ -55,6 +53,7 @@ import ( "vitess.io/vitess/go/vt/vtadmin/rbac" "vitess.io/vitess/go/vt/vtadmin/sort" "vitess.io/vitess/go/vt/vtadmin/vtadminproto" + "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtexplain" @@ -1721,11 +1720,8 @@ func (api *API) StartWorkflow(ctx context.Context, req *vtadminpb.StartWorkflowR return c.Vtctld.WorkflowUpdate(ctx, &vtctldatapb.WorkflowUpdateRequest{ Keyspace: req.Keyspace, TabletRequest: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ - Workflow: req.Workflow, - Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), - State: binlogdatapb.VReplicationWorkflowState_Running, + Workflow: req.Workflow, + State: ptr.Of(binlogdatapb.VReplicationWorkflowState_Running), }, }) } @@ -1751,11 +1747,8 @@ func (api *API) StopWorkflow(ctx context.Context, req *vtadminpb.StopWorkflowReq return c.Vtctld.WorkflowUpdate(ctx, &vtctldatapb.WorkflowUpdateRequest{ Keyspace: req.Keyspace, TabletRequest: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ - Workflow: req.Workflow, - Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), - State: binlogdatapb.VReplicationWorkflowState_Stopped, + Workflow: req.Workflow, + State: ptr.Of(binlogdatapb.VReplicationWorkflowState_Stopped), }, }) } diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index 1f07dce40ff..1a4735b1c82 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -99,6 +99,7 @@ import ( "vitess.io/vitess/go/constants/sidecar" "vitess.io/vitess/go/mysql/collations" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/cmd/vtctldclient/cli" "vitess.io/vitess/go/flagutil" @@ -3805,7 +3806,7 @@ func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag } } } else { - tabletTypes = []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)} + tabletTypes = textutil.SimulatedNullTabletTypeSlice } onddl := int32(textutil.SimulatedNullInt) // To signify no value has been provided if subFlags.Lookup("on-ddl").Changed { // Validate the provided value @@ -3827,9 +3828,10 @@ func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag Workflow: workflow, Cells: *cells, TabletTypes: tabletTypes, - TabletSelectionPreference: tsp, - OnDdl: binlogdatapb.OnDDLAction(onddl), - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), // We don't allow changing this in the client command + TabletSelectionPreference: &tsp, + } + if onddl != int32(textutil.SimulatedNullInt) { + rpcReq.(*tabletmanagerdatapb.UpdateVReplicationWorkflowRequest).OnDdl = ptr.Of(binlogdatapb.OnDDLAction(onddl)) } } results, err = wr.WorkflowAction(ctx, workflow, keyspace, action, *dryRun, rpcReq, *shards) // Only update currently uses the new RPC path diff --git a/go/vt/vtctl/workflow/materializer.go b/go/vt/vtctl/workflow/materializer.go index f0171f31cab..46dc4f1ad5d 100644 --- a/go/vt/vtctl/workflow/materializer.go +++ b/go/vt/vtctl/workflow/materializer.go @@ -24,6 +24,7 @@ import ( "sync" "time" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/textutil" "vitess.io/vitess/go/vt/concurrency" @@ -42,7 +43,6 @@ import ( binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" vschemapb "vitess.io/vitess/go/vt/proto/vschema" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) @@ -497,13 +497,10 @@ func (mz *materializer) startStreams(ctx context.Context) error { } if _, err := mz.tmc.UpdateVReplicationWorkflow(ctx, targetPrimary.Tablet, &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: mz.ms.Workflow, - State: binlogdatapb.VReplicationWorkflowState_Running, + State: ptr.Of(binlogdatapb.VReplicationWorkflowState_Running), // Don't change anything else, so pass simulated NULLs. - Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{ - topodatapb.TabletType(textutil.SimulatedNullInt), - }, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), + Cells: textutil.SimulatedNullStringSlice, + TabletTypes: textutil.SimulatedNullTabletTypeSlice, }); err != nil { return vterrors.Wrap(err, "failed to update workflow") } diff --git a/go/vt/vtctl/workflow/resharder.go b/go/vt/vtctl/workflow/resharder.go index 4f4ed34963a..c40dbe96668 100644 --- a/go/vt/vtctl/workflow/resharder.go +++ b/go/vt/vtctl/workflow/resharder.go @@ -24,7 +24,7 @@ import ( "sync" "time" - "vitess.io/vitess/go/textutil" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/key" @@ -331,10 +331,7 @@ func (rs *resharder) startStreams(ctx context.Context) error { // that we've created on the new shards as we're migrating them. req := &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ AllWorkflows: true, - State: binlogdatapb.VReplicationWorkflowState_Running, - // We don't want to update anything else so use simulated NULLs. - Message: textutil.SimulatedNullString, - StopPosition: textutil.SimulatedNullString, + State: ptr.Of(binlogdatapb.VReplicationWorkflowState_Running), } if _, err := rs.s.tmc.UpdateVReplicationWorkflows(ctx, targetPrimary.Tablet, req); err != nil { return vterrors.Wrapf(err, "UpdateVReplicationWorkflows(%v, 'state='%s')", diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication.go b/go/vt/vttablet/tabletmanager/rpc_vreplication.go index c8c334d896e..30dc792b1c1 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication.go @@ -438,13 +438,11 @@ func (tm *TabletManager) UpdateVReplicationWorkflow(ctx context.Context, req *ta source := row.AsBytes("source", []byte{}) state := row.AsString("state", "") message := row.AsString("message", "") - if req.State == binlogdatapb.VReplicationWorkflowState_Running && strings.ToUpper(message) == workflow.Frozen { + if req.State != nil && *req.State == binlogdatapb.VReplicationWorkflowState_Running && + strings.ToUpper(message) == workflow.Frozen { return &tabletmanagerdatapb.UpdateVReplicationWorkflowResponse{Result: nil}, vterrors.New(vtrpcpb.Code_FAILED_PRECONDITION, "cannot start a workflow when it is frozen") } - // For the string based values, we use NULL to differentiate - // from an empty string. The NULL value indicates that we - // should keep the existing value. if !textutil.ValueIsSimulatedNull(req.Cells) { cells = req.Cells } @@ -452,24 +450,27 @@ func (tm *TabletManager) UpdateVReplicationWorkflow(ctx context.Context, req *ta tabletTypes = req.TabletTypes } tabletTypesStr := topoproto.MakeStringTypeCSV(tabletTypes) - if (inorder && req.TabletSelectionPreference == tabletmanagerdatapb.TabletSelectionPreference_UNKNOWN) || - (req.TabletSelectionPreference == tabletmanagerdatapb.TabletSelectionPreference_INORDER) { + if req.TabletSelectionPreference != nil && + ((inorder && *req.TabletSelectionPreference == tabletmanagerdatapb.TabletSelectionPreference_UNKNOWN) || + (*req.TabletSelectionPreference == tabletmanagerdatapb.TabletSelectionPreference_INORDER)) { tabletTypesStr = discovery.InOrderHint + tabletTypesStr } if err = prototext.Unmarshal(source, bls); err != nil { return nil, err } - // If we don't want to update the existing value then pass - // the simulated NULL value of -1. - if !textutil.ValueIsSimulatedNull(req.OnDdl) { - bls.OnDdl = req.OnDdl + // We also need to check for a SimulatedNull here to support older clients and + // smooth upgrades. All non-slice simulated NULL checks can be removed in v22+. + if req.OnDdl != nil && *req.OnDdl != binlogdatapb.OnDDLAction(textutil.SimulatedNullInt) { + bls.OnDdl = *req.OnDdl } source, err = prototext.Marshal(bls) if err != nil { return nil, err } - if !textutil.ValueIsSimulatedNull(req.State) { - state = binlogdatapb.VReplicationWorkflowState_name[int32(req.State)] + // We also need to check for a SimulatedNull here to support older clients and + // smooth upgrades. All non-slice simulated NULL checks can be removed in v22+. + if req.State != nil && *req.State != binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt) { + state = binlogdatapb.VReplicationWorkflowState_name[int32(*req.State)] } if state == binlogdatapb.VReplicationWorkflowState_Running.String() { // `Workflow Start` sets the new state to Running. However, if stream is still copying tables, we should set @@ -623,14 +624,16 @@ func (tm *TabletManager) buildUpdateVReplicationWorkflowsQuery(req *tabletmanage if req.GetAllWorkflows() && (len(req.GetIncludeWorkflows()) > 0 || len(req.GetExcludeWorkflows()) > 0) { return "", errAllWithIncludeExcludeWorkflows } - if textutil.ValueIsSimulatedNull(req.GetState()) && textutil.ValueIsSimulatedNull(req.GetMessage()) && textutil.ValueIsSimulatedNull(req.GetStopPosition()) { + if req.State == nil && req.Message == nil && req.StopPosition == nil { return "", errNoFieldsToUpdate } sets := strings.Builder{} predicates := strings.Builder{} // First add the SET clauses. - if !textutil.ValueIsSimulatedNull(req.GetState()) { + // We also need to check for a SimulatedNull here to support older clients and + // smooth upgrades. All non-slice simulated NULL checks can be removed in v22+. + if req.State != nil && *req.State != binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt) { state, ok := binlogdatapb.VReplicationWorkflowState_name[int32(req.GetState())] if !ok { return "", vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid state value: %v", req.GetState()) @@ -638,14 +641,18 @@ func (tm *TabletManager) buildUpdateVReplicationWorkflowsQuery(req *tabletmanage sets.WriteString(" state = ") sets.WriteString(sqltypes.EncodeStringSQL(state)) } - if !textutil.ValueIsSimulatedNull(req.GetMessage()) { + // We also need to check for a SimulatedNull here to support older clients and + // smooth upgrades. All non-slice simulated NULL checks can be removed in v22+. + if req.Message != nil && *req.Message != sqltypes.Null.String() { if sets.Len() > 0 { sets.WriteByte(',') } sets.WriteString(" message = ") sets.WriteString(sqltypes.EncodeStringSQL(req.GetMessage())) } - if !textutil.ValueIsSimulatedNull(req.GetStopPosition()) { + // We also need to check for a SimulatedNull here to support older clients and + // smooth upgrades. All non-slice simulated NULL checks can be removed in v22+. + if req.StopPosition != nil && *req.StopPosition != sqltypes.Null.String() { if sets.Len() > 0 { sets.WriteByte(',') } diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go index 7ab959c1e17..34cc32640de 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go @@ -30,6 +30,7 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/constants/sidecar" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/sqlescape" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/textutil" @@ -96,6 +97,11 @@ var ( position = fmt.Sprintf("%s/%s", gtidFlavor, gtidPosition) setNetReadTimeout = fmt.Sprintf("set @@session.net_read_timeout = %v", vttablet.VReplicationNetReadTimeout) setNetWriteTimeout = fmt.Sprintf("set @@session.net_write_timeout = %v", vttablet.VReplicationNetWriteTimeout) + inOrder = tabletmanagerdatapb.TabletSelectionPreference_INORDER + running = binlogdatapb.VReplicationWorkflowState_Running + stopped = binlogdatapb.VReplicationWorkflowState_Stopped + exec = binlogdatapb.OnDDLAction_EXEC + execIgnore = binlogdatapb.OnDDLAction_EXEC_IGNORE ) // TestCreateVReplicationWorkflow tests the query generated @@ -605,7 +611,6 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update cells", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), Cells: []string{"zone2"}, // TabletTypes is an empty value, so the current value should be cleared }, @@ -616,9 +621,8 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update cells, NULL tablet_types", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), Cells: []string{"zone3"}, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, // So keep the current value of replica + TabletTypes: textutil.SimulatedNullTabletTypeSlice, // So keep the current value of replica }, query: fmt.Sprintf(`update _vt.vreplication set state = 'Running', source = 'keyspace:"%s" shard:"%s" filter:{rules:{match:"corder" filter:"select * from corder"} rules:{match:"customer" filter:"select * from customer"}}', cell = '%s', tablet_types = '%s' where id in (%d)`, keyspace, shard, "zone3", tabletTypes[0], vreplID), @@ -627,8 +631,7 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update tablet_types", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), - TabletSelectionPreference: tabletmanagerdatapb.TabletSelectionPreference_INORDER, + TabletSelectionPreference: &inOrder, TabletTypes: []topodatapb.TabletType{topodatapb.TabletType_RDONLY, topodatapb.TabletType_REPLICA}, }, query: fmt.Sprintf(`update _vt.vreplication set state = 'Running', source = 'keyspace:"%s" shard:"%s" filter:{rules:{match:"corder" filter:"select * from corder"} rules:{match:"customer" filter:"select * from customer"}}', cell = '', tablet_types = '%s' where id in (%d)`, @@ -638,7 +641,6 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update tablet_types, NULL cells", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), Cells: textutil.SimulatedNullStringSlice, // So keep the current value of zone1 TabletTypes: []topodatapb.TabletType{topodatapb.TabletType_RDONLY}, }, @@ -649,8 +651,7 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update on_ddl", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), - OnDdl: binlogdatapb.OnDDLAction_EXEC, + OnDdl: &exec, }, query: fmt.Sprintf(`update _vt.vreplication set state = 'Running', source = 'keyspace:"%s" shard:"%s" filter:{rules:{match:"corder" filter:"select * from corder"} rules:{match:"customer" filter:"select * from customer"}} on_ddl:%s', cell = '', tablet_types = '' where id in (%d)`, keyspace, shard, binlogdatapb.OnDDLAction_EXEC.String(), vreplID), @@ -659,10 +660,9 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update cell,tablet_types,on_ddl", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), Cells: []string{"zone1", "zone2", "zone3"}, TabletTypes: []topodatapb.TabletType{topodatapb.TabletType_RDONLY, topodatapb.TabletType_REPLICA, topodatapb.TabletType_PRIMARY}, - OnDdl: binlogdatapb.OnDDLAction_EXEC_IGNORE, + OnDdl: &execIgnore, }, query: fmt.Sprintf(`update _vt.vreplication set state = 'Running', source = 'keyspace:"%s" shard:"%s" filter:{rules:{match:"corder" filter:"select * from corder"} rules:{match:"customer" filter:"select * from customer"}} on_ddl:%s', cell = '%s', tablet_types = '%s' where id in (%d)`, keyspace, shard, binlogdatapb.OnDDLAction_EXEC_IGNORE.String(), "zone1,zone2,zone3", "rdonly,replica,primary", vreplID), @@ -671,10 +671,9 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update state", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState_Stopped, + State: &stopped, Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), + TabletTypes: textutil.SimulatedNullTabletTypeSlice, }, query: fmt.Sprintf(`update _vt.vreplication set state = '%s', source = 'keyspace:"%s" shard:"%s" filter:{rules:{match:"corder" filter:"select * from corder"} rules:{match:"customer" filter:"select * from customer"}}', cell = '%s', tablet_types = '%s' where id in (%d)`, binlogdatapb.VReplicationWorkflowState_Stopped.String(), keyspace, shard, cells[0], tabletTypes[0], vreplID), @@ -683,10 +682,9 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { name: "update to running while copying", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ Workflow: workflow, - State: binlogdatapb.VReplicationWorkflowState_Running, + State: &running, Cells: textutil.SimulatedNullStringSlice, - TabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - OnDdl: binlogdatapb.OnDDLAction(textutil.SimulatedNullInt), + TabletTypes: textutil.SimulatedNullTabletTypeSlice, }, isCopying: true, query: fmt.Sprintf(`update _vt.vreplication set state = 'Copying', source = 'keyspace:"%s" shard:"%s" filter:{rules:{match:"corder" filter:"select * from corder"} rules:{match:"customer" filter:"select * from customer"}}', cell = '%s', tablet_types = '%s' where id in (%d)`, @@ -700,7 +698,7 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { // which doesn't play well with subtests. defer func() { if err := recover(); err != nil { - t.Errorf("Recovered from panic: %v", err) + t.Errorf("Recovered from panic: %v, stack: %s", err, debug.Stack()) } }() @@ -710,8 +708,7 @@ func TestUpdateVReplicationWorkflow(t *testing.T) { // These are the same for each RPC call. tenv.tmc.tablets[tabletUID].vrdbClient.ExpectRequest(fmt.Sprintf("use %s", sidecar.GetIdentifier()), &sqltypes.Result{}, nil) tenv.tmc.tablets[tabletUID].vrdbClient.ExpectRequest(selectQuery, selectRes, nil) - if tt.request.State == binlogdatapb.VReplicationWorkflowState_Running || - tt.request.State == binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt) { + if tt.request.State == nil || *tt.request.State == binlogdatapb.VReplicationWorkflowState_Running { tenv.tmc.tablets[tabletUID].vrdbClient.ExpectRequest(fmt.Sprintf("use %s", sidecar.GetIdentifier()), &sqltypes.Result{}, nil) if tt.isCopying { tenv.tmc.tablets[tabletUID].vrdbClient.ExpectRequest(getCopyStateQuery, copying, nil) @@ -756,9 +753,7 @@ func TestUpdateVReplicationWorkflows(t *testing.T) { name: "update only state=running for all workflows", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ AllWorkflows: true, - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: textutil.SimulatedNullString, - StopPosition: textutil.SimulatedNullString, + State: &running, }, query: fmt.Sprintf(`update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Running' where id in (%s)`, strings.Join(vreplIDs, ", ")), }, @@ -766,9 +761,7 @@ func TestUpdateVReplicationWorkflows(t *testing.T) { name: "update only state=running for all but reverse workflows", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ ExcludeWorkflows: []string{workflow.ReverseWorkflowName("testwf")}, - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: textutil.SimulatedNullString, - StopPosition: textutil.SimulatedNullString, + State: &running, }, query: fmt.Sprintf(`update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Running' where id in (%s)`, strings.Join(vreplIDs, ", ")), }, @@ -776,9 +769,9 @@ func TestUpdateVReplicationWorkflows(t *testing.T) { name: "update all vals for all workflows", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ AllWorkflows: true, - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: "hi", - StopPosition: position, + State: &running, + Message: ptr.Of("hi"), + StopPosition: &position, }, query: fmt.Sprintf(`update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Running', message = 'hi', stop_pos = '%s' where id in (%s)`, position, strings.Join(vreplIDs, ", ")), }, @@ -786,9 +779,7 @@ func TestUpdateVReplicationWorkflows(t *testing.T) { name: "update state=stopped, messege=for vdiff for two workflows", request: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ IncludeWorkflows: []string{"testwf", "testwf2"}, - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: textutil.SimulatedNullString, - StopPosition: textutil.SimulatedNullString, + State: &running, }, query: fmt.Sprintf(`update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Running' where id in (%s)`, strings.Join(vreplIDs, ", ")), }, @@ -3235,6 +3226,12 @@ func TestBuildUpdateVReplicationWorkflowsQuery(t *testing.T) { DBName: "vt_testks", }, } + forVdiff := "for vdiff" + forPos := "for until position" + forTest := "test message" + stopPos1 := "MySQL56/17b1039f-21b6-13ed-b365-1a43f95f28a3:1-20" + stopPos2 := "MySQL56/17b1039f-21b6-13ed-b365-1a43f95f28a3:1-9999" + tests := []struct { name string req *tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest @@ -3242,18 +3239,14 @@ func TestBuildUpdateVReplicationWorkflowsQuery(t *testing.T) { wantErr string }{ { - name: "nothing to update", - req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ - State: binlogdatapb.VReplicationWorkflowState(textutil.SimulatedNullInt), - Message: textutil.SimulatedNullString, - StopPosition: textutil.SimulatedNullString, - }, + name: "nothing to update", + req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{}, wantErr: errNoFieldsToUpdate.Error(), }, { name: "mutually exclusive options", req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ - State: binlogdatapb.VReplicationWorkflowState_Running, + State: &running, AllWorkflows: true, ExcludeWorkflows: []string{"wf1"}, }, @@ -3262,9 +3255,9 @@ func TestBuildUpdateVReplicationWorkflowsQuery(t *testing.T) { { name: "all values and options", req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: "test message", - StopPosition: "MySQL56/17b1039f-21b6-13ed-b365-1a43f95f28a3:1-20", + State: &running, + Message: &forTest, + StopPosition: &stopPos1, IncludeWorkflows: []string{"wf2", "wf3"}, ExcludeWorkflows: []string{"1wf"}, }, @@ -3273,9 +3266,7 @@ func TestBuildUpdateVReplicationWorkflowsQuery(t *testing.T) { { name: "state for all", req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: textutil.SimulatedNullString, - StopPosition: textutil.SimulatedNullString, + State: &running, AllWorkflows: true, }, want: "update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Running' where db_name = 'vt_testks'", @@ -3283,9 +3274,8 @@ func TestBuildUpdateVReplicationWorkflowsQuery(t *testing.T) { { name: "stop all for vdiff", req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ - State: binlogdatapb.VReplicationWorkflowState_Stopped, - Message: "for vdiff", - StopPosition: textutil.SimulatedNullString, + State: &stopped, + Message: &forVdiff, AllWorkflows: true, }, want: "update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Stopped', message = 'for vdiff' where db_name = 'vt_testks'", @@ -3293,9 +3283,9 @@ func TestBuildUpdateVReplicationWorkflowsQuery(t *testing.T) { { name: "start one until position", req: &tabletmanagerdatapb.UpdateVReplicationWorkflowsRequest{ - State: binlogdatapb.VReplicationWorkflowState_Running, - Message: "for until position", - StopPosition: "MySQL56/17b1039f-21b6-13ed-b365-1a43f95f28a3:1-9999", + State: &running, + Message: &forPos, + StopPosition: &stopPos2, IncludeWorkflows: []string{"wf1"}, }, want: "update /*vt+ ALLOW_UNSAFE_VREPLICATION_WRITE */ _vt.vreplication set state = 'Running', message = 'for until position', stop_pos = 'MySQL56/17b1039f-21b6-13ed-b365-1a43f95f28a3:1-9999' where db_name = 'vt_testks' and workflow in ('wf1')", diff --git a/go/vt/vttablet/tabletmanager/vdiff/action_test.go b/go/vt/vttablet/tabletmanager/vdiff/action_test.go index 2143f0a2369..6bdc7044878 100644 --- a/go/vt/vttablet/tabletmanager/vdiff/action_test.go +++ b/go/vt/vttablet/tabletmanager/vdiff/action_test.go @@ -26,6 +26,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/vterrors" @@ -46,7 +47,6 @@ func TestPerformVDiffAction(t *testing.T) { query string result *sqltypes.Result // Optional if you need a non-empty result } - false := false tests := []struct { name string @@ -103,7 +103,7 @@ func TestPerformVDiffAction(t *testing.T) { Options: &tabletmanagerdatapb.VDiffOptions{ PickerOptions: &tabletmanagerdatapb.VDiffPickerOptions{}, CoreOptions: &tabletmanagerdatapb.VDiffCoreOptions{ - AutoStart: &false, + AutoStart: ptr.Of(false), }, }, }, diff --git a/go/vt/wrangler/vexec.go b/go/vt/wrangler/vexec.go index 2c279c5c6cf..41f02ef9e63 100644 --- a/go/vt/wrangler/vexec.go +++ b/go/vt/wrangler/vexec.go @@ -445,9 +445,9 @@ func (wr *Wrangler) execWorkflowAction(ctx context.Context, workflow, keyspace, changes = true dryRunChanges.WriteString(fmt.Sprintf(" tablet_types=%q\n", topoproto.MakeStringTypeCSV(rpcReq.TabletTypes))) } - if !textutil.ValueIsSimulatedNull(rpcReq.OnDdl) { + if rpcReq.OnDdl != nil { changes = true - dryRunChanges.WriteString(fmt.Sprintf(" on_ddl=%q\n", binlogdatapb.OnDDLAction_name[int32(rpcReq.OnDdl)])) + dryRunChanges.WriteString(fmt.Sprintf(" on_ddl=%q\n", binlogdatapb.OnDDLAction_name[int32(*rpcReq.OnDdl)])) } if !changes { return nil, fmt.Errorf("no updates were provided; use --cells, --tablet-types, or --on-ddl to specify new values") diff --git a/go/vt/wrangler/vexec_test.go b/go/vt/wrangler/vexec_test.go index 80cd2aef565..223e338b303 100644 --- a/go/vt/wrangler/vexec_test.go +++ b/go/vt/wrangler/vexec_test.go @@ -29,13 +29,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/textutil" "vitess.io/vitess/go/vt/logutil" + "vitess.io/vitess/go/vt/vtenv" + binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" - "vitess.io/vitess/go/vt/vtenv" ) var ( @@ -397,49 +399,45 @@ func TestWorkflowUpdate(t *testing.T) { defer env.close() logger := logutil.NewMemoryLogger() wr := New(vtenv.NewTestEnv(), logger, env.topoServ, env.tmc) - nullSlice := textutil.SimulatedNullStringSlice // Used to represent a non-provided value - nullOnDDL := binlogdatapb.OnDDLAction(textutil.SimulatedNullInt) // Used to represent a non-provided value + tests := []struct { name string cells []string tabletTypes []topodatapb.TabletType - onDDL binlogdatapb.OnDDLAction + onDDL *binlogdatapb.OnDDLAction output string wantErr string }{ { name: "no flags", - cells: nullSlice, - tabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - onDDL: nullOnDDL, + cells: textutil.SimulatedNullStringSlice, + tabletTypes: textutil.SimulatedNullTabletTypeSlice, wantErr: "no updates were provided; use --cells, --tablet-types, or --on-ddl to specify new values", }, { name: "only cells", cells: []string{"zone1"}, - tabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - onDDL: nullOnDDL, + tabletTypes: textutil.SimulatedNullTabletTypeSlice, output: "The following workflow fields will be updated:\n cells=\"zone1\"\nOn the following tablets in the target keyspace for workflow wrWorkflow:\n zone1-0000000200 (target/-80)\n zone1-0000000210 (target/80-)\n", }, { name: "only tablet types", - cells: nullSlice, + cells: textutil.SimulatedNullStringSlice, tabletTypes: []topodatapb.TabletType{topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA}, - onDDL: nullOnDDL, output: "The following workflow fields will be updated:\n tablet_types=\"primary,replica\"\nOn the following tablets in the target keyspace for workflow wrWorkflow:\n zone1-0000000200 (target/-80)\n zone1-0000000210 (target/80-)\n", }, { name: "only on-ddl", - cells: nullSlice, - tabletTypes: []topodatapb.TabletType{topodatapb.TabletType(textutil.SimulatedNullInt)}, - onDDL: binlogdatapb.OnDDLAction_EXEC_IGNORE, + cells: textutil.SimulatedNullStringSlice, + tabletTypes: textutil.SimulatedNullTabletTypeSlice, + onDDL: ptr.Of(binlogdatapb.OnDDLAction_EXEC_IGNORE), output: "The following workflow fields will be updated:\n on_ddl=\"EXEC_IGNORE\"\nOn the following tablets in the target keyspace for workflow wrWorkflow:\n zone1-0000000200 (target/-80)\n zone1-0000000210 (target/80-)\n", }, { name: "all flags", cells: []string{"zone1", "zone2"}, tabletTypes: []topodatapb.TabletType{topodatapb.TabletType_RDONLY, topodatapb.TabletType_SPARE}, - onDDL: binlogdatapb.OnDDLAction_EXEC, + onDDL: ptr.Of(binlogdatapb.OnDDLAction_EXEC), output: "The following workflow fields will be updated:\n cells=\"zone1,zone2\"\n tablet_types=\"rdonly,spare\"\n on_ddl=\"EXEC\"\nOn the following tablets in the target keyspace for workflow wrWorkflow:\n zone1-0000000200 (target/-80)\n zone1-0000000210 (target/80-)\n", }, } diff --git a/proto/tabletmanagerdata.proto b/proto/tabletmanagerdata.proto index eb7c3485156..c4b7583d441 100644 --- a/proto/tabletmanagerdata.proto +++ b/proto/tabletmanagerdata.proto @@ -696,9 +696,9 @@ message UpdateVReplicationWorkflowRequest { string workflow = 1; repeated string cells = 2; repeated topodata.TabletType tablet_types = 3; - TabletSelectionPreference tablet_selection_preference = 4; - binlogdata.OnDDLAction on_ddl = 5; - binlogdata.VReplicationWorkflowState state = 6; + optional TabletSelectionPreference tablet_selection_preference = 4; + optional binlogdata.OnDDLAction on_ddl = 5; + optional binlogdata.VReplicationWorkflowState state = 6; reserved 7; // unused, was: repeated string shards } @@ -716,9 +716,9 @@ message UpdateVReplicationWorkflowsRequest { bool all_workflows = 1; repeated string include_workflows = 2; repeated string exclude_workflows = 3; - binlogdata.VReplicationWorkflowState state = 4; - string message = 5; - string stop_position = 6; + optional binlogdata.VReplicationWorkflowState state = 4; + optional string message = 5; + optional string stop_position = 6; } message UpdateVReplicationWorkflowsResponse { diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index ab35975069c..bcc947e4b05 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -30507,13 +30507,22 @@ export namespace tabletmanagerdata { public tablet_types: topodata.TabletType[]; /** UpdateVReplicationWorkflowRequest tablet_selection_preference. */ - public tablet_selection_preference: tabletmanagerdata.TabletSelectionPreference; + public tablet_selection_preference?: (tabletmanagerdata.TabletSelectionPreference|null); /** UpdateVReplicationWorkflowRequest on_ddl. */ - public on_ddl: binlogdata.OnDDLAction; + public on_ddl?: (binlogdata.OnDDLAction|null); /** UpdateVReplicationWorkflowRequest state. */ - public state: binlogdata.VReplicationWorkflowState; + public state?: (binlogdata.VReplicationWorkflowState|null); + + /** UpdateVReplicationWorkflowRequest _tablet_selection_preference. */ + public _tablet_selection_preference?: "tablet_selection_preference"; + + /** UpdateVReplicationWorkflowRequest _on_ddl. */ + public _on_ddl?: "on_ddl"; + + /** UpdateVReplicationWorkflowRequest _state. */ + public _state?: "state"; /** * Creates a new UpdateVReplicationWorkflowRequest instance using the specified properties. @@ -30731,13 +30740,22 @@ export namespace tabletmanagerdata { public exclude_workflows: string[]; /** UpdateVReplicationWorkflowsRequest state. */ - public state: binlogdata.VReplicationWorkflowState; + public state?: (binlogdata.VReplicationWorkflowState|null); /** UpdateVReplicationWorkflowsRequest message. */ - public message: string; + public message?: (string|null); /** UpdateVReplicationWorkflowsRequest stop_position. */ - public stop_position: string; + public stop_position?: (string|null); + + /** UpdateVReplicationWorkflowsRequest _state. */ + public _state?: "state"; + + /** UpdateVReplicationWorkflowsRequest _message. */ + public _message?: "message"; + + /** UpdateVReplicationWorkflowsRequest _stop_position. */ + public _stop_position?: "stop_position"; /** * Creates a new UpdateVReplicationWorkflowsRequest instance using the specified properties. diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index dcbcac92955..2b88bb0fc5e 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -70629,27 +70629,63 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { /** * UpdateVReplicationWorkflowRequest tablet_selection_preference. - * @member {tabletmanagerdata.TabletSelectionPreference} tablet_selection_preference + * @member {tabletmanagerdata.TabletSelectionPreference|null|undefined} tablet_selection_preference * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest * @instance */ - UpdateVReplicationWorkflowRequest.prototype.tablet_selection_preference = 0; + UpdateVReplicationWorkflowRequest.prototype.tablet_selection_preference = null; /** * UpdateVReplicationWorkflowRequest on_ddl. - * @member {binlogdata.OnDDLAction} on_ddl + * @member {binlogdata.OnDDLAction|null|undefined} on_ddl * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest * @instance */ - UpdateVReplicationWorkflowRequest.prototype.on_ddl = 0; + UpdateVReplicationWorkflowRequest.prototype.on_ddl = null; /** * UpdateVReplicationWorkflowRequest state. - * @member {binlogdata.VReplicationWorkflowState} state + * @member {binlogdata.VReplicationWorkflowState|null|undefined} state + * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest + * @instance + */ + UpdateVReplicationWorkflowRequest.prototype.state = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateVReplicationWorkflowRequest _tablet_selection_preference. + * @member {"tablet_selection_preference"|undefined} _tablet_selection_preference * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest * @instance */ - UpdateVReplicationWorkflowRequest.prototype.state = 0; + Object.defineProperty(UpdateVReplicationWorkflowRequest.prototype, "_tablet_selection_preference", { + get: $util.oneOfGetter($oneOfFields = ["tablet_selection_preference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateVReplicationWorkflowRequest _on_ddl. + * @member {"on_ddl"|undefined} _on_ddl + * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest + * @instance + */ + Object.defineProperty(UpdateVReplicationWorkflowRequest.prototype, "_on_ddl", { + get: $util.oneOfGetter($oneOfFields = ["on_ddl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateVReplicationWorkflowRequest _state. + * @member {"state"|undefined} _state + * @memberof tabletmanagerdata.UpdateVReplicationWorkflowRequest + * @instance + */ + Object.defineProperty(UpdateVReplicationWorkflowRequest.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new UpdateVReplicationWorkflowRequest instance using the specified properties. @@ -70794,6 +70830,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { UpdateVReplicationWorkflowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + let properties = {}; if (message.workflow != null && message.hasOwnProperty("workflow")) if (!$util.isString(message.workflow)) return "workflow: string expected"; @@ -70825,7 +70862,8 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { break; } } - if (message.tablet_selection_preference != null && message.hasOwnProperty("tablet_selection_preference")) + if (message.tablet_selection_preference != null && message.hasOwnProperty("tablet_selection_preference")) { + properties._tablet_selection_preference = 1; switch (message.tablet_selection_preference) { default: return "tablet_selection_preference: enum value expected"; @@ -70834,7 +70872,9 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { case 3: break; } - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + } + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) { + properties._on_ddl = 1; switch (message.on_ddl) { default: return "on_ddl: enum value expected"; @@ -70844,7 +70884,9 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { case 3: break; } - if (message.state != null && message.hasOwnProperty("state")) + } + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; switch (message.state) { default: return "state: enum value expected"; @@ -70857,6 +70899,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { case 6: break; } + } return null; }; @@ -71038,12 +71081,8 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.cells = []; object.tablet_types = []; } - if (options.defaults) { + if (options.defaults) object.workflow = ""; - object.tablet_selection_preference = options.enums === String ? "ANY" : 0; - object.on_ddl = options.enums === String ? "IGNORE" : 0; - object.state = options.enums === String ? "Unknown" : 0; - } if (message.workflow != null && message.hasOwnProperty("workflow")) object.workflow = message.workflow; if (message.cells && message.cells.length) { @@ -71056,12 +71095,21 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { 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.tablet_selection_preference != null && message.hasOwnProperty("tablet_selection_preference")) + if (message.tablet_selection_preference != null && message.hasOwnProperty("tablet_selection_preference")) { object.tablet_selection_preference = options.enums === String ? $root.tabletmanagerdata.TabletSelectionPreference[message.tablet_selection_preference] === undefined ? message.tablet_selection_preference : $root.tabletmanagerdata.TabletSelectionPreference[message.tablet_selection_preference] : message.tablet_selection_preference; - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) + if (options.oneofs) + object._tablet_selection_preference = "tablet_selection_preference"; + } + if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) { object.on_ddl = options.enums === String ? $root.binlogdata.OnDDLAction[message.on_ddl] === undefined ? message.on_ddl : $root.binlogdata.OnDDLAction[message.on_ddl] : message.on_ddl; - if (message.state != null && message.hasOwnProperty("state")) + if (options.oneofs) + object._on_ddl = "on_ddl"; + } + if (message.state != null && message.hasOwnProperty("state")) { object.state = options.enums === String ? $root.binlogdata.VReplicationWorkflowState[message.state] === undefined ? message.state : $root.binlogdata.VReplicationWorkflowState[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } return object; }; @@ -71359,27 +71407,63 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { /** * UpdateVReplicationWorkflowsRequest state. - * @member {binlogdata.VReplicationWorkflowState} state + * @member {binlogdata.VReplicationWorkflowState|null|undefined} state * @memberof tabletmanagerdata.UpdateVReplicationWorkflowsRequest * @instance */ - UpdateVReplicationWorkflowsRequest.prototype.state = 0; + UpdateVReplicationWorkflowsRequest.prototype.state = null; /** * UpdateVReplicationWorkflowsRequest message. - * @member {string} message + * @member {string|null|undefined} message * @memberof tabletmanagerdata.UpdateVReplicationWorkflowsRequest * @instance */ - UpdateVReplicationWorkflowsRequest.prototype.message = ""; + UpdateVReplicationWorkflowsRequest.prototype.message = null; /** * UpdateVReplicationWorkflowsRequest stop_position. - * @member {string} stop_position + * @member {string|null|undefined} stop_position * @memberof tabletmanagerdata.UpdateVReplicationWorkflowsRequest * @instance */ - UpdateVReplicationWorkflowsRequest.prototype.stop_position = ""; + UpdateVReplicationWorkflowsRequest.prototype.stop_position = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateVReplicationWorkflowsRequest _state. + * @member {"state"|undefined} _state + * @memberof tabletmanagerdata.UpdateVReplicationWorkflowsRequest + * @instance + */ + Object.defineProperty(UpdateVReplicationWorkflowsRequest.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateVReplicationWorkflowsRequest _message. + * @member {"message"|undefined} _message + * @memberof tabletmanagerdata.UpdateVReplicationWorkflowsRequest + * @instance + */ + Object.defineProperty(UpdateVReplicationWorkflowsRequest.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateVReplicationWorkflowsRequest _stop_position. + * @member {"stop_position"|undefined} _stop_position + * @memberof tabletmanagerdata.UpdateVReplicationWorkflowsRequest + * @instance + */ + Object.defineProperty(UpdateVReplicationWorkflowsRequest.prototype, "_stop_position", { + get: $util.oneOfGetter($oneOfFields = ["stop_position"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new UpdateVReplicationWorkflowsRequest instance using the specified properties. @@ -71516,6 +71600,7 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { UpdateVReplicationWorkflowsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + let properties = {}; if (message.all_workflows != null && message.hasOwnProperty("all_workflows")) if (typeof message.all_workflows !== "boolean") return "all_workflows: boolean expected"; @@ -71533,7 +71618,8 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (!$util.isString(message.exclude_workflows[i])) return "exclude_workflows: string[] expected"; } - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && message.hasOwnProperty("state")) { + properties._state = 1; switch (message.state) { default: return "state: enum value expected"; @@ -71546,12 +71632,17 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { case 6: break; } - if (message.message != null && message.hasOwnProperty("message")) + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; if (!$util.isString(message.message)) return "message: string expected"; - if (message.stop_position != null && message.hasOwnProperty("stop_position")) + } + if (message.stop_position != null && message.hasOwnProperty("stop_position")) { + properties._stop_position = 1; if (!$util.isString(message.stop_position)) return "stop_position: string expected"; + } return null; }; @@ -71643,12 +71734,8 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.include_workflows = []; object.exclude_workflows = []; } - if (options.defaults) { + if (options.defaults) object.all_workflows = false; - object.state = options.enums === String ? "Unknown" : 0; - object.message = ""; - object.stop_position = ""; - } if (message.all_workflows != null && message.hasOwnProperty("all_workflows")) object.all_workflows = message.all_workflows; if (message.include_workflows && message.include_workflows.length) { @@ -71661,12 +71748,21 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { for (let j = 0; j < message.exclude_workflows.length; ++j) object.exclude_workflows[j] = message.exclude_workflows[j]; } - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && message.hasOwnProperty("state")) { object.state = options.enums === String ? $root.binlogdata.VReplicationWorkflowState[message.state] === undefined ? message.state : $root.binlogdata.VReplicationWorkflowState[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) + if (options.oneofs) + object._state = "state"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = message.message; - if (message.stop_position != null && message.hasOwnProperty("stop_position")) + if (options.oneofs) + object._message = "message"; + } + if (message.stop_position != null && message.hasOwnProperty("stop_position")) { object.stop_position = message.stop_position; + if (options.oneofs) + object._stop_position = "stop_position"; + } return object; };