diff --git a/go/cmd/vtctldclient/command/throttler.go b/go/cmd/vtctldclient/command/throttler.go index da8b0763b0d..200d5f87f0b 100644 --- a/go/cmd/vtctldclient/command/throttler.go +++ b/go/cmd/vtctldclient/command/throttler.go @@ -169,10 +169,6 @@ func init() { UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.MetricName, "metric-name", "", "name of the metric for which we apply a new threshold (requires --threshold). If empty, the default (either 'lag' or 'custom') metric is used.") UpdateThrottlerConfig.Flags().Float64Var(&updateThrottlerConfigOptions.Threshold, "threshold", 0, "threshold for the either default check (replication lag seconds) or custom check") UpdateThrottlerConfig.Flags().StringVar(&updateThrottlerConfigOptions.CustomQuery, "custom-query", "", "custom throttler check query") - UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.CheckAsCheckSelf, "check-as-check-self", false, "/throttler/check requests behave as is /throttler/check-self was called") - UpdateThrottlerConfig.Flags().BoolVar(&updateThrottlerConfigOptions.CheckAsCheckShard, "check-as-check-shard", false, "use standard behavior for /throttler/check requests") - UpdateThrottlerConfig.Flags().MarkDeprecated("check-as-check-self", "specify metric with scope in --app-metrics to apply to all checks, or use --scope in CheckThrottler for a specific check") - UpdateThrottlerConfig.Flags().MarkDeprecated("check-as-check-shard", "specify metric with scope in --app-metrics to apply to all checks, or use --scope in CheckThrottler for a specific check") UpdateThrottlerConfig.Flags().StringVar(&unthrottledAppRule.Name, "unthrottle-app", "", "an app name to unthrottle") UpdateThrottlerConfig.Flags().StringVar(&throttledAppRule.Name, "throttle-app", "", "an app name to throttle") diff --git a/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go b/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go index e052762cd13..41acd0dea4e 100644 --- a/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go +++ b/go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go @@ -21,7 +21,6 @@ import ( "flag" "fmt" "math/rand/v2" - "net/http" "os" "path" "strings" @@ -33,6 +32,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/capabilities" "vitess.io/vitess/go/vt/log" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" "vitess.io/vitess/go/vt/schema" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" @@ -207,7 +207,7 @@ func TestRevertSchemaChanges(t *testing.T) { require.Equal(t, 1, len(shards)) throttler.EnableLagThrottlerAndWaitForStatus(t, clusterInstance) - throttler.WaitForCheckThrottlerResult(t, clusterInstance, primaryTablet, throttlerapp.TestingName, nil, http.StatusOK, time.Minute) + throttler.WaitForCheckThrottlerResult(t, clusterInstance, primaryTablet, throttlerapp.TestingName, nil, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, time.Minute) t.Run("revertible", testRevertible) t.Run("revert", testRevert) diff --git a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go index 48b341bf449..3b8111121fe 100644 --- a/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go +++ b/go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go @@ -178,7 +178,6 @@ func vitessThrottleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) ( flags := &throttle.CheckFlags{ Scope: base.ShardScope, SkipRequestHeartbeats: skipRequestHeartbeats, - MultiMetricsEnabled: true, } resp, err := throttler.CheckThrottler(clusterInstance, tablet, throttlerapp.VitessName, flags) return resp, err @@ -188,7 +187,6 @@ func throttleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) (*vtctl flags := &throttle.CheckFlags{ Scope: base.ShardScope, SkipRequestHeartbeats: skipRequestHeartbeats, - MultiMetricsEnabled: true, } resp, err := throttler.CheckThrottler(clusterInstance, tablet, testAppName, flags) return resp, err @@ -196,8 +194,7 @@ func throttleCheck(tablet *cluster.Vttablet, skipRequestHeartbeats bool) (*vtctl func throttleCheckSelf(tablet *cluster.Vttablet) (*vtctldatapb.CheckThrottlerResponse, error) { flags := &throttle.CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } resp, err := throttler.CheckThrottler(clusterInstance, tablet, testAppName, flags) return resp, err @@ -220,7 +217,7 @@ func warmUpHeartbeat(t *testing.T) tabletmanagerdatapb.CheckThrottlerResponseCod require.NoError(t, err) time.Sleep(time.Second) - return throttle.ResponseCodeFromStatus(resp.Check.ResponseCode, int(resp.Check.StatusCode)) + return resp.Check.ResponseCode } // waitForThrottleCheckStatus waits for the tablet to return the provided HTTP code in a throttle check @@ -242,7 +239,7 @@ func waitForThrottleCheckStatus(t *testing.T, tablet *cluster.Vttablet, wantCode } select { case <-ctx.Done(): - return resp.Check, false + return resp.Check, assert.EqualValues(t, wantCode, resp.Check.ResponseCode, "response: %+v", resp) case <-ticker.C: } } @@ -376,13 +373,6 @@ func TestInitialThrottler(t *testing.T) { assert.Equal(t, base.ShardScope.String(), metrics.Scope) } - if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { - rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) - assert.NoError(t, err) - t.Logf("Seconds_Behind_Source: %s", rs.Named().Row()["Seconds_Behind_Source"].ToString()) - t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) - t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) { rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) assert.NoError(t, err) @@ -401,13 +391,6 @@ func TestInitialThrottler(t *testing.T) { for _, metrics := range resp.Check.Metrics { assert.Equal(t, base.ShardScope.String(), metrics.Scope) } - if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { - rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) - assert.NoError(t, err) - t.Logf("Seconds_Behind_Source: %s", rs.Named().Row()["Seconds_Behind_Source"].ToString()) - t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) - t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) { rs, err := replicaTablet.VttabletProcess.QueryTablet("show replica status", keyspaceName, false) assert.NoError(t, err) @@ -481,13 +464,11 @@ func TestThrottlerAfterMetricsCollected(t *testing.T) { t.Run("validating primary check self", func(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("validating replica check self", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) } @@ -514,7 +495,6 @@ func TestLag(t *testing.T) { t.Run("expecting throttler push back", func(t *testing.T) { resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("primary self-check should still be fine", func(t *testing.T) { @@ -525,10 +505,6 @@ func TestLag(t *testing.T) { assert.Equal(t, base.SelfScope.String(), metrics.Scope) } // self (on primary) is unaffected by replication lag - if !assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) { - t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) - t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) { t.Logf("throttler primary status: %+v", throttleStatus(t, primaryTablet)) t.Logf("throttler replica status: %+v", throttleStatus(t, replicaTablet)) @@ -541,7 +517,6 @@ func TestLag(t *testing.T) { for _, metrics := range resp.Check.Metrics { assert.Equal(t, base.SelfScope.String(), metrics.Scope) } - assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("exempting test app", func(t *testing.T) { @@ -619,13 +594,11 @@ func TestLag(t *testing.T) { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) // self (on primary) is unaffected by replication lag - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("replica self-check should be fine", func(t *testing.T) { resp, err := throttleCheckSelf(replicaTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) } @@ -668,7 +641,6 @@ func TestCustomQuery(t *testing.T) { throttler.WaitForValidData(t, primaryTablet, throttlerEnabledTimeout) resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("test threads running", func(t *testing.T) { @@ -695,7 +667,6 @@ func TestCustomQuery(t *testing.T) { { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusTooManyRequests, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) } }) @@ -707,7 +678,6 @@ func TestCustomQuery(t *testing.T) { { resp, err := throttleCheckSelf(primaryTablet) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) } }) @@ -730,7 +700,6 @@ func TestRestoreDefaultQuery(t *testing.T) { t.Run("validating OK response from throttler with default threshold, heartbeats running", func(t *testing.T) { resp, err := throttleCheck(primaryTablet, false) require.NoError(t, err) - assert.EqualValues(t, http.StatusOK, resp.Check.StatusCode, "Unexpected response from throttler: %+v", resp) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, resp.Check.ResponseCode, "Unexpected response from throttler: %+v", resp) }) t.Run("validating pushback response from throttler on default threshold once heartbeats go stale", func(t *testing.T) { diff --git a/go/test/endtoend/throttler/util.go b/go/test/endtoend/throttler/util.go index 162388c83e0..588efb090cc 100644 --- a/go/test/endtoend/throttler/util.go +++ b/go/test/endtoend/throttler/util.go @@ -66,8 +66,7 @@ func CheckThrottlerRaw(vtctldProcess *cluster.VtctldClientProcess, tablet *clust args = append(args, "CheckThrottler") if flags == nil { flags = &throttle.CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } } if appName != "" { @@ -124,11 +123,6 @@ func UpdateThrottlerTopoConfigRaw( args = append(args, "--threshold", fmt.Sprintf("%f", opts.Threshold)) } args = append(args, "--custom-query", opts.CustomQuery) - if opts.CustomQuery != "" { - args = append(args, "--check-as-check-self") - } else { - args = append(args, "--check-as-check-shard") - } if appRule != nil { args = append(args, "--throttle-app", appRule.Name) args = append(args, "--throttle-app-duration", time.Until(protoutil.TimeFromProto(appRule.ExpiresAt).UTC()).String()) @@ -485,7 +479,7 @@ func EnableLagThrottlerAndWaitForStatus(t *testing.T, clusterInstance *cluster.L } } -func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalProcessCluster, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags, expect int32, timeout time.Duration) (*vtctldatapb.CheckThrottlerResponse, error) { +func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalProcessCluster, tablet *cluster.Vttablet, appName throttlerapp.Name, flags *throttle.CheckFlags, expect tabletmanagerdatapb.CheckThrottlerResponseCode, timeout time.Duration) (*vtctldatapb.CheckThrottlerResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() ticker := time.NewTicker(time.Second) @@ -493,7 +487,7 @@ func WaitForCheckThrottlerResult(t *testing.T, clusterInstance *cluster.LocalPro for { resp, err := CheckThrottler(clusterInstance, tablet, appName, flags) require.NoError(t, err) - if resp.Check.StatusCode == expect { + if resp.Check.ResponseCode == expect { return resp, nil } select { @@ -534,11 +528,11 @@ func WaitForValidData(t *testing.T, tablet *cluster.Vttablet, timeout time.Durat for { checkResp, checkErr := http.Get(checkURL) - if checkErr != nil { + if checkErr == nil { defer checkResp.Body.Close() } selfCheckResp, selfCheckErr := http.Get(selfCheckURL) - if selfCheckErr != nil { + if selfCheckErr == nil { defer selfCheckResp.Body.Close() } if checkErr == nil && selfCheckErr == nil && diff --git a/go/test/endtoend/vreplication/helper_test.go b/go/test/endtoend/vreplication/helper_test.go index 6bfce05119a..b3c55becc4a 100644 --- a/go/test/endtoend/vreplication/helper_test.go +++ b/go/test/endtoend/vreplication/helper_test.go @@ -55,6 +55,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/throttlerapp" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) @@ -178,16 +179,32 @@ func waitForQueryResult(t *testing.T, conn *mysql.Conn, database string, query s // waitForTabletThrottlingStatus waits for the tablet to return the provided HTTP code for // the provided app name in its self check. -func waitForTabletThrottlingStatus(t *testing.T, tablet *cluster.VttabletProcess, throttlerApp throttlerapp.Name, wantCode int64) { - var gotCode int64 +func waitForTabletThrottlingStatus(t *testing.T, tablet *cluster.VttabletProcess, throttlerApp throttlerapp.Name, wantCode int) { timer := time.NewTimer(defaultTimeout) defer timer.Stop() for { output, err := throttlerCheckSelf(tablet, throttlerApp) require.NoError(t, err) - gotCode, err = jsonparser.GetInt([]byte(output), "StatusCode") - require.NoError(t, err) + responseCode, err := jsonparser.GetInt([]byte(output), "ResponseCode") + require.NoError(t, err, "waitForTabletThrottlingStatus output: %v", output) + + var gotCode int + switch tabletmanagerdatapb.CheckThrottlerResponseCode(responseCode) { + case tabletmanagerdatapb.CheckThrottlerResponseCode_OK: + gotCode = http.StatusOK + case tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED: + gotCode = http.StatusExpectationFailed + case tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED: + gotCode = http.StatusTooManyRequests + case tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC: + gotCode = http.StatusNotFound + case tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR: + gotCode = http.StatusInternalServerError + default: + gotCode = http.StatusInternalServerError + } + if wantCode == gotCode { // Wait for any cached check values to be cleared and the new // status value to be in effect everywhere before returning. diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index 93690d02140..33ba53dcbb8 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -7114,11 +7114,8 @@ type CheckThrottlerRequest struct { SkipRequestHeartbeats bool `protobuf:"varint,3,opt,name=skip_request_heartbeats,json=skipRequestHeartbeats,proto3" json:"skip_request_heartbeats,omitempty"` // OKIfNotExists asks the throttler to return OK even if the metric does not exist OkIfNotExists bool `protobuf:"varint,4,opt,name=ok_if_not_exists,json=okIfNotExists,proto3" json:"ok_if_not_exists,omitempty"` - // MultiMetricsEnabled is always set to "true" and is how a multi-metrics enabled replica - // throttler knows its being probed by a multi-metrics enabled primary vttablet. - MultiMetricsEnabled bool `protobuf:"varint,5,opt,name=multi_metrics_enabled,json=multiMetricsEnabled,proto3" json:"multi_metrics_enabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckThrottlerRequest) Reset() { @@ -7179,17 +7176,8 @@ func (x *CheckThrottlerRequest) GetOkIfNotExists() bool { return false } -func (x *CheckThrottlerRequest) GetMultiMetricsEnabled() bool { - if x != nil { - return x.MultiMetricsEnabled - } - return false -} - type CheckThrottlerResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // Value is the metric value collected by the tablet Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` // Threshold is the throttling threshold the table was comparing the value with @@ -7244,13 +7232,6 @@ func (*CheckThrottlerResponse) Descriptor() ([]byte, []int) { return file_tabletmanagerdata_proto_rawDescGZIP(), []int{140} } -func (x *CheckThrottlerResponse) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - func (x *CheckThrottlerResponse) GetValue() float64 { if x != nil { return x.Value @@ -7796,8 +7777,6 @@ type CheckThrottlerResponse_Metric struct { state protoimpl.MessageState `protogen:"open.v1"` // Name of the metric Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // Value is the metric value collected by the tablet Value float64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` // Threshold is the throttling threshold the table was comparing the value with @@ -7851,13 +7830,6 @@ func (x *CheckThrottlerResponse_Metric) GetName() string { return "" } -func (x *CheckThrottlerResponse_Metric) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - func (x *CheckThrottlerResponse_Metric) GetValue() float64 { if x != nil { return x.Value @@ -8005,9 +7977,8 @@ func (x *GetThrottlerStatusResponse_MetricHealth) GetSecondsSinceLastHealthy() i } type GetThrottlerStatusResponse_RecentApp struct { - state protoimpl.MessageState `protogen:"open.v1"` - CheckedAt *vttime.Time `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"` - StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + CheckedAt *vttime.Time `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"` // ResponseCode is the enum representation of the response ResponseCode CheckThrottlerResponseCode `protobuf:"varint,3,opt,name=response_code,json=responseCode,proto3,enum=tabletmanagerdata.CheckThrottlerResponseCode" json:"response_code,omitempty"` unknownFields protoimpl.UnknownFields @@ -8051,13 +8022,6 @@ func (x *GetThrottlerStatusResponse_RecentApp) GetCheckedAt() *vttime.Time { return nil } -func (x *GetThrottlerStatusResponse_RecentApp) GetStatusCode() int32 { - if x != nil { - return x.StatusCode - } - return 0 -} - func (x *GetThrottlerStatusResponse_RecentApp) GetResponseCode() CheckThrottlerResponseCode { if x != nil { return x.ResponseCode @@ -9018,7 +8982,7 @@ var file_tabletmanagerdata_proto_rawDesc = string([]byte{ 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, + 0x22, 0xc6, 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, @@ -9028,63 +8992,59 @@ var file_tabletmanagerdata_proto_rawDesc = string([]byte{ 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, + 0x6b, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4a, 0x04, 0x08, 0x05, + 0x10, 0x06, 0x52, 0x15, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xf6, 0x05, 0x0a, 0x16, 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, + 0x6f, 0x6e, 0x73, 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, 0xf0, + 0x01, 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, 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, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 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, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 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, + 0x9b, 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, @@ -9197,61 +9157,59 @@ var file_tabletmanagerdata_proto_rawDesc = string([]byte{ 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, + 0x1a, 0x92, 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, 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, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, - 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x1a, 0x37, 0x0a, 0x09, - 0x54, 0x61, 0x67, 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, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 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, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 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, 0x22, 0xaa, 0x01, + 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 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, 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, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 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, 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, }) var ( diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go index dc7f132ec2e..8916da22868 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata_vtproto.pb.go @@ -2771,7 +2771,6 @@ func (m *CheckThrottlerRequest) CloneVT() *CheckThrottlerRequest { r.Scope = m.Scope r.SkipRequestHeartbeats = m.SkipRequestHeartbeats r.OkIfNotExists = m.OkIfNotExists - r.MultiMetricsEnabled = m.MultiMetricsEnabled if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -2789,7 +2788,6 @@ func (m *CheckThrottlerResponse_Metric) CloneVT() *CheckThrottlerResponse_Metric } r := new(CheckThrottlerResponse_Metric) r.Name = m.Name - r.StatusCode = m.StatusCode r.Value = m.Value r.Threshold = m.Threshold r.Error = m.Error @@ -2812,7 +2810,6 @@ func (m *CheckThrottlerResponse) CloneVT() *CheckThrottlerResponse { return (*CheckThrottlerResponse)(nil) } r := new(CheckThrottlerResponse) - r.StatusCode = m.StatusCode r.Value = m.Value r.Threshold = m.Threshold r.Error = m.Error @@ -2897,7 +2894,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) CloneVT() *GetThrottlerStatusResp } r := new(GetThrottlerStatusResponse_RecentApp) r.CheckedAt = m.CheckedAt.CloneVT() - r.StatusCode = m.StatusCode r.ResponseCode = m.ResponseCode if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -9821,16 +9817,6 @@ func (m *CheckThrottlerRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.MultiMetricsEnabled { - i-- - if m.MultiMetricsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } if m.OkIfNotExists { i-- if m.OkIfNotExists { @@ -9936,11 +9922,6 @@ func (m *CheckThrottlerResponse_Metric) MarshalToSizedBufferVT(dAtA []byte) (int i-- dAtA[i] = 0x19 } - if m.StatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x10 - } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) @@ -10058,11 +10039,6 @@ func (m *CheckThrottlerResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error i-- dAtA[i] = 0x11 } - if m.StatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } @@ -10228,11 +10204,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) MarshalToSizedBufferVT(dAtA []byt i-- dAtA[i] = 0x18 } - if m.StatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) - i-- - dAtA[i] = 0x10 - } if m.CheckedAt != nil { size, err := m.CheckedAt.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -13050,9 +13021,6 @@ func (m *CheckThrottlerRequest) SizeVT() (n int) { if m.OkIfNotExists { n += 2 } - if m.MultiMetricsEnabled { - n += 2 - } n += len(m.unknownFields) return n } @@ -13067,9 +13035,6 @@ func (m *CheckThrottlerResponse_Metric) SizeVT() (n int) { if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.StatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) - } if m.Value != 0 { n += 9 } @@ -13101,9 +13066,6 @@ func (m *CheckThrottlerResponse) SizeVT() (n int) { } var l int _ = l - if m.StatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) - } if m.Value != 0 { n += 9 } @@ -13203,9 +13165,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) SizeVT() (n int) { l = m.CheckedAt.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.StatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) - } if m.ResponseCode != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.ResponseCode)) } @@ -28606,26 +28565,6 @@ func (m *CheckThrottlerRequest) UnmarshalVT(dAtA []byte) error { } } m.OkIfNotExists = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MultiMetricsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MultiMetricsEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -28709,25 +28648,6 @@ func (m *CheckThrottlerResponse_Metric) UnmarshalVT(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } case 3: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) @@ -28916,25 +28836,6 @@ func (m *CheckThrottlerResponse) UnmarshalVT(dAtA []byte) error { return fmt.Errorf("proto: CheckThrottlerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) @@ -29591,25 +29492,6 @@ func (m *GetThrottlerStatusResponse_RecentApp) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) - } - m.StatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StatusCode |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ResponseCode", wireType) diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index ec9fd80db89..2afb508e4a6 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -737,7 +737,6 @@ func (s *VtctldServer) CheckThrottler(ctx context.Context, req *vtctldatapb.Chec Scope: req.Scope, SkipRequestHeartbeats: req.SkipRequestHeartbeats, OkIfNotExists: req.OkIfNotExists, - MultiMetricsEnabled: true, } r, err := s.tmc.CheckThrottler(ctx, ti.Tablet, tmReq) if err != nil { @@ -2058,9 +2057,6 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata if req.Enable && req.Disable { return nil, fmt.Errorf("--enable and --disable are mutually exclusive") } - if req.CheckAsCheckSelf && req.CheckAsCheckShard { - return nil, fmt.Errorf("--check-as-check-self and --check-as-check-shard are mutually exclusive") - } if req.MetricName != "" && !base.KnownMetricNames.Contains(base.MetricName(req.MetricName)) { return nil, fmt.Errorf("unknown metric name: %s", req.MetricName) @@ -2126,12 +2122,6 @@ func (s *VtctldServer) UpdateThrottlerConfig(ctx context.Context, req *vtctldata if req.Disable { throttlerConfig.Enabled = false } - if req.CheckAsCheckSelf { - throttlerConfig.CheckAsCheckSelf = true - } - if req.CheckAsCheckShard { - throttlerConfig.CheckAsCheckSelf = false - } if req.ThrottledApp != nil && req.ThrottledApp.Name != "" { timeNow := time.Now() if protoutil.TimeFromProto(req.ThrottledApp.ExpiresAt).After(timeNow) { diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index ec29413100e..2bba7c85e2a 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -708,7 +708,7 @@ var commands = []commandGroup{ { name: "UpdateThrottlerConfig", method: commandUpdateThrottlerConfig, - params: "[--enable|--disable] [--threshold=] [--custom-query=] [--check-as-check-self|--check-as-check-shard] [--throttle-app|unthrottle-app=] [--throttle-app-ratio=] [--throttle-app-duration=] [--throttle-app-exempt] ", + params: "[--enable|--disable] [--threshold=] [--custom-query=] [--throttle-app|unthrottle-app=] [--throttle-app-ratio=] [--throttle-app-duration=] [--throttle-app-exempt] ", help: "Update the table throttler configuration for all cells and tablets of a given keyspace", }, { @@ -3598,8 +3598,6 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su disable := subFlags.Bool("disable", false, "Disable the throttler") threshold := subFlags.Float64("threshold", 0, "threshold for the either default check (replication lag seconds) or custom check") customQuery := subFlags.String("custom-query", "", "custom throttler check query") - checkAsCheckSelf := subFlags.Bool("check-as-check-self", false, "/throttler/check requests behave as is /throttler/check-self was called") - checkAsCheckShard := subFlags.Bool("check-as-check-shard", false, "use standard behavior for /throttler/check requests") unthrottledApp := subFlags.String("unthrottle-app", "", "an app name to unthrottle") throttledApp := subFlags.String("throttle-app", "", "an app name to throttle") throttledAppRatio := subFlags.Float64("throttle-app-ratio", throttle.DefaultThrottleRatio, "ratio to throttle app (app specififed in --throttled-app)") @@ -3615,9 +3613,6 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su if *enable && *disable { return fmt.Errorf("--enable and --disable are mutually exclusive") } - if *checkAsCheckSelf && *checkAsCheckShard { - return fmt.Errorf("--check-as-check-self and --check-as-check-shard are mutually exclusive") - } if *throttledApp != "" && *unthrottledApp != "" { return fmt.Errorf("--throttle-app and --unthrottle-app are mutually exclusive") @@ -3635,14 +3630,12 @@ func commandUpdateThrottlerConfig(ctx context.Context, wr *wrangler.Wrangler, su keyspace := subFlags.Arg(0) req := &vtctldatapb.UpdateThrottlerConfigRequest{ - Keyspace: keyspace, - Enable: *enable, - Disable: *disable, - CustomQuery: *customQuery, - CustomQuerySet: customQuerySet, - Threshold: *threshold, - CheckAsCheckSelf: *checkAsCheckSelf, - CheckAsCheckShard: *checkAsCheckShard, + Keyspace: keyspace, + Enable: *enable, + Disable: *disable, + CustomQuery: *customQuery, + CustomQuerySet: customQuerySet, + Threshold: *threshold, } if *throttledApp != "" { req.ThrottledApp = &topodatapb.ThrottledAppRule{ diff --git a/go/vt/vttablet/grpctmclient/client_test.go b/go/vt/vttablet/grpctmclient/client_test.go index 2a5ae3ff6d0..9c3638461ba 100644 --- a/go/vt/vttablet/grpctmclient/client_test.go +++ b/go/vt/vttablet/grpctmclient/client_test.go @@ -76,7 +76,7 @@ func TestDialDedicatedPool(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} + req := &tabletmanagerdatapb.CheckThrottlerRequest{} _, err := client.CheckThrottler(ctx, tablet, req) assert.Error(t, err) }) @@ -141,7 +141,7 @@ func TestDialPool(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} + req := &tabletmanagerdatapb.CheckThrottlerRequest{} _, err := client.CheckThrottler(ctx, tablet, req) assert.Error(t, err) }) diff --git a/go/vt/vttablet/tabletmanager/rpc_throttler.go b/go/vt/vttablet/tabletmanager/rpc_throttler.go index 1617a5b275b..734ae0172ed 100644 --- a/go/vt/vttablet/tabletmanager/rpc_throttler.go +++ b/go/vt/vttablet/tabletmanager/rpc_throttler.go @@ -47,15 +47,13 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd Scope: base.Scope(req.Scope), SkipRequestHeartbeats: req.SkipRequestHeartbeats, OKIfNotExists: req.OkIfNotExists, - MultiMetricsEnabled: req.MultiMetricsEnabled, } checkResult := tm.QueryServiceControl.CheckThrottler(ctx, req.AppName, flags) if checkResult == nil { return nil, vterrors.Errorf(vtrpc.Code_INTERNAL, "nil checkResult") } resp := &tabletmanagerdatapb.CheckThrottlerResponse{ - ResponseCode: throttle.ResponseCodeFromStatus(checkResult.ResponseCode, checkResult.StatusCode), - StatusCode: int32(checkResult.StatusCode), + ResponseCode: checkResult.ResponseCode, Value: checkResult.Value, Threshold: checkResult.Threshold, Message: checkResult.Message, @@ -68,8 +66,7 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd resp.Metrics[name] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ Name: name, Scope: metric.Scope, - StatusCode: int32(metric.StatusCode), - ResponseCode: throttle.ResponseCodeFromStatus(metric.ResponseCode, metric.StatusCode), + ResponseCode: metric.ResponseCode, Value: metric.Value, Threshold: metric.Threshold, Message: metric.Message, @@ -79,8 +76,7 @@ func (tm *TabletManager) CheckThrottler(ctx context.Context, req *tabletmanagerd // For backwards compatibility, when the checked tablet is of lower version, it does not return a // matrics map, but only the one metric. resp.Metrics[base.DefaultMetricName.String()] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ - StatusCode: int32(checkResult.StatusCode), - ResponseCode: throttle.ResponseCodeFromStatus(checkResult.ResponseCode, checkResult.StatusCode), + ResponseCode: checkResult.ResponseCode, Value: checkResult.Value, Threshold: checkResult.Threshold, Message: checkResult.Message, @@ -145,7 +141,6 @@ func (tm *TabletManager) GetThrottlerStatus(ctx context.Context, req *tabletmana for _, recentApp := range status.RecentApps { resp.RecentApps[recentApp.AppName] = &tabletmanagerdatapb.GetThrottlerStatusResponse_RecentApp{ CheckedAt: protoutil.TimeToProto(recentApp.CheckedAt), - StatusCode: int32(recentApp.StatusCode), ResponseCode: recentApp.ResponseCode, } } diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index b65b3949354..27510be5824 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -1928,19 +1928,32 @@ func (tsv *TabletServer) registerThrottlerCheckHandlers() { flags := &throttle.CheckFlags{ Scope: scope, SkipRequestHeartbeats: (r.URL.Query().Get("s") == "true"), - MultiMetricsEnabled: true, } metricNames := tsv.lagThrottler.MetricNames(r.URL.Query()["m"]) checkResult := tsv.lagThrottler.Check(ctx, appName, metricNames, flags) if checkResult.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC && flags.OKIfNotExists { - checkResult.StatusCode = http.StatusOK // 200 checkResult.ResponseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_OK } if r.Method == http.MethodGet { w.Header().Set("Content-Type", "application/json") } - w.WriteHeader(checkResult.StatusCode) + var httpStatusCode int + switch checkResult.ResponseCode { + case tabletmanagerdatapb.CheckThrottlerResponseCode_OK: + httpStatusCode = http.StatusOK + case tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED: + httpStatusCode = http.StatusExpectationFailed + case tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED: + httpStatusCode = http.StatusTooManyRequests + case tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC: + httpStatusCode = http.StatusNotFound + case tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR: + httpStatusCode = http.StatusInternalServerError + default: + httpStatusCode = http.StatusInternalServerError + } + w.WriteHeader(httpStatusCode) if r.Method == http.MethodGet { json.NewEncoder(w).Encode(checkResult) } diff --git a/go/vt/vttablet/tabletserver/throttle/base/recent_app.go b/go/vt/vttablet/tabletserver/throttle/base/recent_app.go index 7ae2bf789af..b8756ffee5b 100644 --- a/go/vt/vttablet/tabletserver/throttle/base/recent_app.go +++ b/go/vt/vttablet/tabletserver/throttle/base/recent_app.go @@ -50,16 +50,14 @@ import ( type RecentApp struct { AppName string CheckedAt time.Time - StatusCode int ResponseCode tabletmanagerdatapb.CheckThrottlerResponseCode } // NewRecentApp creates a RecentApp -func NewRecentApp(appName string, statusCode int, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) *RecentApp { +func NewRecentApp(appName string, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) *RecentApp { result := &RecentApp{ AppName: appName, CheckedAt: time.Now(), - StatusCode: statusCode, ResponseCode: responseCode, } return result diff --git a/go/vt/vttablet/tabletserver/throttle/check.go b/go/vt/vttablet/tabletserver/throttle/check.go index d7f43d85e9d..888daeb5801 100644 --- a/go/vt/vttablet/tabletserver/throttle/check.go +++ b/go/vt/vttablet/tabletserver/throttle/check.go @@ -44,7 +44,6 @@ package throttle import ( "context" "fmt" - "net/http" "time" "vitess.io/vitess/go/stats" @@ -71,13 +70,10 @@ type CheckFlags struct { OverrideThreshold float64 OKIfNotExists bool SkipRequestHeartbeats bool - MultiMetricsEnabled bool } // selfCheckFlags have no special hints -var selfCheckFlags = &CheckFlags{ - MultiMetricsEnabled: true, -} +var selfCheckFlags = &CheckFlags{} // ThrottlerCheck provides methods for an app checking on metrics type ThrottlerCheck struct { @@ -102,42 +98,34 @@ func (check *ThrottlerCheck) checkAppMetricResult(ctx context.Context, appName s } value, err := metricResult.Get() if appName == "" { - return NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED, http.StatusExpectationFailed, value, threshold, "", fmt.Errorf("no app indicated")) + return NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED, value, threshold, "", fmt.Errorf("no app indicated")) } - var statusCode int var responseCode tabletmanagerdatapb.CheckThrottlerResponseCode - switch { case err == base.ErrAppDenied: // app specifically not allowed to get metrics - statusCode = http.StatusExpectationFailed // 417 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED case err == base.ErrNoSuchMetric: // not collected yet, or metric does not exist - statusCode = http.StatusNotFound // 404 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC case err != nil: // any error - statusCode = http.StatusInternalServerError // 500 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR case value > threshold: // casual throttling - statusCode = http.StatusTooManyRequests // 429 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED err = base.ErrThresholdExceeded default: // all good! - statusCode = http.StatusOK // 200 responseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_OK } - return NewCheckResult(responseCode, statusCode, value, threshold, matchedApp, err) + return NewCheckResult(responseCode, value, threshold, matchedApp, err) } // Check is the core function that runs when a user wants to check a metric func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope base.Scope, metricNames base.MetricNames, flags *CheckFlags) (checkResult *CheckResult) { checkResult = &CheckResult{ - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Metrics: make(map[string]*MetricResult), } @@ -146,7 +134,6 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba } metricNames = metricNames.Unique() applyMetricToCheckResult := func(metricName base.MetricName, metric *MetricResult) { - checkResult.StatusCode = metric.StatusCode checkResult.ResponseCode = metric.ResponseCode checkResult.Value = metric.Value checkResult.Threshold = metric.Threshold @@ -198,7 +185,6 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba checkResult.RecentlyChecked = true } metric := &MetricResult{ - StatusCode: metricCheckResult.StatusCode, ResponseCode: metricCheckResult.ResponseCode, Value: metricCheckResult.Value, Threshold: metricCheckResult.Threshold, @@ -208,11 +194,8 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba Scope: metricScope.String(), // This reports back the actual scope used for the check } checkResult.Metrics[metricName.String()] = metric - if flags.MultiMetricsEnabled && !metricCheckResult.IsOK() && metricName != base.DefaultMetricName { + if !metricCheckResult.IsOK() && metricName != base.DefaultMetricName { // If we're checking multiple metrics, and one of them fails, we should return any of the failing metric. - // For backwards compatibility, if flags.MultiMetricsEnabled is not set, we do not report back failing - // metrics, because a v20 primary would not know how to deal with it, and is not expecting any of those - // metrics. // The only metric we ever report back is the default metric, see below. applyMetricToCheckResult(metricName, metric) } @@ -233,7 +216,7 @@ func (check *ThrottlerCheck) Check(ctx context.Context, appName string, scope ba statsThrottlerCheckAnyError.Add(1) } }(checkResult) - go check.throttler.markRecentApp(appName, checkResult.StatusCode, checkResult.ResponseCode) + go check.throttler.markRecentApp(appName, checkResult.ResponseCode) return checkResult } diff --git a/go/vt/vttablet/tabletserver/throttle/check_result.go b/go/vt/vttablet/tabletserver/throttle/check_result.go index 34532b7ce37..b26bf87e3b3 100644 --- a/go/vt/vttablet/tabletserver/throttle/check_result.go +++ b/go/vt/vttablet/tabletserver/throttle/check_result.go @@ -43,38 +43,13 @@ package throttle import ( "fmt" - "net/http" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" "vitess.io/vitess/go/vt/vttablet/tabletserver/throttle/base" ) -// ResponseCodeFromStatus returns a ResponseCode based on either given response code or HTTP status code. -// It is used to handle the transition period from v20 to v21 where v20 only returns HTTP status code. -// In v22 and beyond, the HTTP status code will be removed, and so will this function. -func ResponseCodeFromStatus(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, statusCode int) tabletmanagerdatapb.CheckThrottlerResponseCode { - if responseCode != tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED { - return responseCode - } - switch statusCode { - case http.StatusOK: - return tabletmanagerdatapb.CheckThrottlerResponseCode_OK - case http.StatusExpectationFailed: - return tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED - case http.StatusTooManyRequests: - return tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED - case http.StatusNotFound: - return tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC - case http.StatusInternalServerError: - return tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR - default: - return tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED - } -} - type MetricResult struct { ResponseCode tabletmanagerdatapb.CheckThrottlerResponseCode `json:"ResponseCode"` - StatusCode int `json:"StatusCode"` Scope string `json:"Scope"` Value float64 `json:"Value"` Threshold float64 `json:"Threshold"` @@ -84,16 +59,12 @@ type MetricResult struct { } func (m *MetricResult) IsOK() bool { - if m.ResponseCode != tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED { - return m.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK - } - return m.StatusCode == http.StatusOK + return m.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK } // CheckResult is the result for an app inquiring on a metric. It also exports as JSON via the API type CheckResult struct { ResponseCode tabletmanagerdatapb.CheckThrottlerResponseCode `json:"ResponseCode"` - StatusCode int `json:"StatusCode"` Value float64 `json:"Value"` Threshold float64 `json:"Threshold"` Error error `json:"-"` @@ -106,10 +77,9 @@ type CheckResult struct { } // NewCheckResult returns a CheckResult -func NewCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, statusCode int, value float64, threshold float64, appName string, err error) *CheckResult { +func NewCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, value float64, threshold float64, appName string, err error) *CheckResult { result := &CheckResult{ ResponseCode: responseCode, - StatusCode: statusCode, Value: value, Threshold: threshold, AppName: appName, @@ -122,15 +92,12 @@ func NewCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, } func (c *CheckResult) IsOK() bool { - if c.ResponseCode != tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED { - return c.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK - } - return c.StatusCode == http.StatusOK + return c.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_OK } // Summary returns a human-readable summary of the check result func (c *CheckResult) Summary() string { - switch ResponseCodeFromStatus(c.ResponseCode, c.StatusCode) { + switch c.ResponseCode { case tabletmanagerdatapb.CheckThrottlerResponseCode_OK: return fmt.Sprintf("%s is granted access", c.AppName) case tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED: @@ -149,11 +116,11 @@ func (c *CheckResult) Summary() string { } // NewErrorCheckResult returns a check result that indicates an error -func NewErrorCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, statusCode int, err error) *CheckResult { - return NewCheckResult(responseCode, statusCode, 0, 0, "", err) +func NewErrorCheckResult(responseCode tabletmanagerdatapb.CheckThrottlerResponseCode, err error) *CheckResult { + return NewCheckResult(responseCode, 0, 0, "", err) } // NoSuchMetricCheckResult is a result returns when a metric is unknown -var NoSuchMetricCheckResult = NewErrorCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC, http.StatusNotFound, base.ErrNoSuchMetric) +var NoSuchMetricCheckResult = NewErrorCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC, base.ErrNoSuchMetric) -var okMetricCheckResult = NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_OK, http.StatusOK, 0, 0, "", nil) +var okMetricCheckResult = NewCheckResult(tabletmanagerdatapb.CheckThrottlerResponseCode_OK, 0, 0, "", nil) diff --git a/go/vt/vttablet/tabletserver/throttle/check_result_test.go b/go/vt/vttablet/tabletserver/throttle/check_result_test.go index fdb0ee600ba..6a550666360 100644 --- a/go/vt/vttablet/tabletserver/throttle/check_result_test.go +++ b/go/vt/vttablet/tabletserver/throttle/check_result_test.go @@ -17,7 +17,6 @@ limitations under the License. package throttle import ( - "net/http" "testing" "github.com/stretchr/testify/assert" @@ -25,56 +24,6 @@ import ( tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" ) -func TestReponseCodeFromStatus(t *testing.T) { - tcases := []struct { - responseCode tabletmanagerdatapb.CheckThrottlerResponseCode - statusCode int - expect tabletmanagerdatapb.CheckThrottlerResponseCode - }{ - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusOK, - tabletmanagerdatapb.CheckThrottlerResponseCode_OK, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusExpectationFailed, - tabletmanagerdatapb.CheckThrottlerResponseCode_APP_DENIED, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusNotFound, - tabletmanagerdatapb.CheckThrottlerResponseCode_UNKNOWN_METRIC, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusInternalServerError, - tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_UNDEFINED, - http.StatusTooManyRequests, - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - http.StatusTooManyRequests, - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - }, - { - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - http.StatusOK, - tabletmanagerdatapb.CheckThrottlerResponseCode_THRESHOLD_EXCEEDED, - }, - } - for _, tcase := range tcases { - t.Run("", func(t *testing.T) { - result := ResponseCodeFromStatus(tcase.responseCode, tcase.statusCode) - assert.Equal(t, tcase.expect, result) - }) - } -} - func TestCheckResultSummary(t *testing.T) { tcases := []struct { checkResult *CheckResult @@ -84,31 +33,6 @@ func TestCheckResultSummary(t *testing.T) { checkResult: &CheckResult{}, summary: "", }, - { - checkResult: &CheckResult{ - StatusCode: http.StatusOK, - AppName: "test", - }, - summary: "test is granted access", - }, - { - checkResult: &CheckResult{ - StatusCode: http.StatusTooManyRequests, - AppName: "test", - MetricName: "bugginess", - Threshold: 100, - Value: 200, - Scope: "self", - }, - summary: "test is denied access due to self/bugginess metric value 200 exceeding threshold 100", - }, - { - checkResult: &CheckResult{ - StatusCode: http.StatusExpectationFailed, - AppName: "test", - }, - summary: "test is explicitly denied access", - }, { checkResult: &CheckResult{ ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, diff --git a/go/vt/vttablet/tabletserver/throttle/client.go b/go/vt/vttablet/tabletserver/throttle/client.go index 8549fb099b6..f0f45341a16 100644 --- a/go/vt/vttablet/tabletserver/throttle/client.go +++ b/go/vt/vttablet/tabletserver/throttle/client.go @@ -70,8 +70,7 @@ func NewBackgroundClient(throttler *Throttler, appName throttlerapp.Name, scope throttler: throttler, appName: appName, flags: CheckFlags{ - Scope: scope, - MultiMetricsEnabled: true, + Scope: scope, }, lastSuccessfulThrottle: make(map[string]int64), } diff --git a/go/vt/vttablet/tabletserver/throttle/throttler.go b/go/vt/vttablet/tabletserver/throttle/throttler.go index 839ba9d43b8..d9abf59ab4b 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler.go @@ -47,7 +47,6 @@ import ( "fmt" "math" "math/rand/v2" - "net/http" "strings" "sync" "sync/atomic" @@ -175,7 +174,6 @@ type Throttler struct { customMetricsQuery atomic.Value MetricsThreshold atomic.Uint64 - checkAsCheckSelf atomic.Bool metricThresholds *cache.Cache aggregatedMetrics *cache.Cache @@ -437,7 +435,6 @@ func (throttler *Throttler) applyThrottlerConfig(ctx context.Context, throttlerC // require per-metric threshold. throttler.StoreMetricsThreshold(throttlerConfig.Threshold) } - throttler.checkAsCheckSelf.Store(throttlerConfig.CheckAsCheckSelf) { // Throttled apps/rules for _, appRule := range throttlerConfig.ThrottledApps { @@ -907,7 +904,7 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, probe } metrics := make(base.ThrottleMetrics) - req := &tabletmanagerdatapb.CheckThrottlerRequest{MultiMetricsEnabled: true} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space + req := &tabletmanagerdatapb.CheckThrottlerRequest{} // We leave AppName empty; it will default to VitessName anyway, and we can save some proto space resp, gRPCErr := tmClient.CheckThrottler(ctx, probe.Tablet, req) if gRPCErr != nil { return metricsWithError(fmt.Errorf("gRPC error accessing tablet %v. Err=%v", probe.Alias, gRPCErr)) @@ -916,9 +913,6 @@ func (throttler *Throttler) generateTabletProbeFunction(scope base.Scope, probe if resp.ResponseCode == tabletmanagerdatapb.CheckThrottlerResponseCode_INTERNAL_ERROR { throttleMetric.Err = fmt.Errorf("response code: %d", resp.ResponseCode) } - if resp.StatusCode == http.StatusInternalServerError { - throttleMetric.Err = fmt.Errorf("status code: %d", resp.StatusCode) - } if resp.RecentlyChecked { // We have just probed a tablet, and it reported back that someone just recently "check"ed it. // We therefore renew the heartbeats lease. @@ -1402,8 +1396,8 @@ func (throttler *Throttler) ThrottledAppsMap() (result map[string](*base.AppThro } // markRecentApp takes note that an app has just asked about throttling, making it "recent" -func (throttler *Throttler) markRecentApp(appName string, statusCode int, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) { - recentApp := base.NewRecentApp(appName, statusCode, responseCode) +func (throttler *Throttler) markRecentApp(appName string, responseCode tabletmanagerdatapb.CheckThrottlerResponseCode) { + recentApp := base.NewRecentApp(appName, responseCode) throttler.recentApps.Set(appName, recentApp, cache.DefaultExpiration) } @@ -1540,9 +1534,6 @@ func (throttler *Throttler) Check(ctx context.Context, appName string, metricNam if flags != nil { scope = flags.Scope } - if scope == base.ShardScope && throttler.checkAsCheckSelf.Load() { - scope = base.SelfScope - } return throttler.checkScope(ctx, appName, scope, metricNames, flags) } diff --git a/go/vt/vttablet/tabletserver/throttle/throttler_test.go b/go/vt/vttablet/tabletserver/throttle/throttler_test.go index 352e641fa35..13a014b52ea 100644 --- a/go/vt/vttablet/tabletserver/throttle/throttler_test.go +++ b/go/vt/vttablet/tabletserver/throttle/throttler_test.go @@ -20,7 +20,6 @@ import ( "context" "fmt" "math" - "net/http" "sync" "sync/atomic" "testing" @@ -92,37 +91,30 @@ var ( } replicaMetrics = map[string]*MetricResult{ base.LagMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.9, }, base.ThreadsRunningMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 13, }, base.CustomMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 14, }, base.LoadAvgMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 5.1, }, base.HistoryListLengthMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 6, }, base.MysqldLoadAvgMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.2211, }, base.MysqldDatadirUsedRatioMetricName.String(): { - StatusCode: http.StatusOK, ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.87, }, @@ -138,7 +130,6 @@ const ( type fakeTMClient struct { tmclient.TabletManagerClient appNames []string - v20 atomic.Bool // help validate v20 backwards compatibility mu sync.Mutex } @@ -148,18 +139,16 @@ func (c *fakeTMClient) Close() { func (c *fakeTMClient) CheckThrottler(ctx context.Context, tablet *topodatapb.Tablet, request *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) { resp := &tabletmanagerdatapb.CheckThrottlerResponse{ - StatusCode: http.StatusOK, + ResponseCode: tabletmanagerdatapb.CheckThrottlerResponseCode_OK, Value: 0.339, Threshold: 1, RecentlyChecked: false, } - if !c.v20.Load() { - resp.ResponseCode = tabletmanagerdatapb.CheckThrottlerResponseCode_OK + { resp.Metrics = make(map[string]*tabletmanagerdatapb.CheckThrottlerResponse_Metric) for name, metric := range replicaMetrics { resp.Metrics[name] = &tabletmanagerdatapb.CheckThrottlerResponse_Metric{ Name: name, - StatusCode: int32(metric.StatusCode), ResponseCode: metric.ResponseCode, Value: metric.Value, Threshold: metric.Threshold, @@ -167,6 +156,7 @@ func (c *fakeTMClient) CheckThrottler(ctx context.Context, tablet *topodatapb.Ta } } } + c.mu.Lock() defer c.mu.Unlock() c.appNames = append(c.appNames, request.AppName) @@ -455,13 +445,11 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { flags := &CheckFlags{ Scope: base.SelfScope, SkipRequestHeartbeats: true, - MultiMetricsEnabled: true, } t.Run("check before apply", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -485,7 +473,6 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to self/lag metric value") @@ -510,7 +497,6 @@ func TestApplyThrottlerConfigMetricThresholds(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -557,7 +543,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { } flags := &CheckFlags{ SkipRequestHeartbeats: true, - MultiMetricsEnabled: true, } throttlerConfig := &topodatapb.ThrottlerConfig{ Enabled: true, @@ -569,7 +554,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to shard/lag metric value") @@ -585,7 +569,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -601,7 +584,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -621,7 +603,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // self loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to self/loadavg metric value") @@ -641,7 +622,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 5.1, checkResult.Value) // shard loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to shard/loadavg metric value") @@ -660,7 +640,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // self loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to self/loadavg metric value") @@ -679,7 +658,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 5.1, checkResult.Value) // shard loadavg value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is denied access due to shard/loadavg metric value") @@ -694,7 +672,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 1, len(checkResult.Metrics), "unexpected metrics: %+v", checkResult.Metrics) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -713,7 +690,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -732,7 +708,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.AllName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is denied access due to self/loadavg metric value") @@ -748,7 +723,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -763,7 +737,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is denied access due to self/loadavg metric value") @@ -775,7 +748,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, "vreplication:online-ddl:12345", nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 2.718, checkResult.Value) // loadavg self value exceeds threshold - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is denied access due to self/loadavg metric value") @@ -786,7 +758,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, "vreplication:online-ddl:test", nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -802,7 +773,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.AllName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), throttlerapp.AllName.String()+" is granted access") @@ -818,7 +788,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, 2, len(checkResult.Metrics)) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -833,7 +802,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), throttlerapp.OnlineDDLName.String()+" is granted access") @@ -851,7 +819,6 @@ func TestApplyThrottlerConfigAppCheckedMetrics(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.Contains(t, checkResult.Summary(), testAppName.String()+" is granted access") @@ -1593,89 +1560,6 @@ func TestProbesWhileOperating(t *testing.T) { }) } -// TestProbesWithV20Replicas is similar to TestProbesWhileOperating, but assumes a v20 replica, which does not report any of the named metrics. -func TestProbesWithV20Replicas(t *testing.T) { - ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - throttler := newTestThrottler() - - tmClient, ok := throttler.overrideTmClient.(*fakeTMClient) - require.True(t, ok) - assert.Empty(t, tmClient.AppNames()) - tmClient.v20.Store(true) - - t.Run("aggregated initial", func(t *testing.T) { - assert.Equal(t, 0, throttler.aggregatedMetrics.ItemCount()) - }) - - runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { - defer cancel() // early termination - t.Run("aggregated", func(t *testing.T) { - aggr := throttler.aggregatedMetricsSnapshot() - assert.Equalf(t, 2*len(base.KnownMetricNames), len(aggr), "aggregated: %+v", aggr) // "self" and "shard", per known metric - assert.Equal(t, 2*len(base.KnownMetricNames), throttler.aggregatedMetrics.ItemCount()) // flushed upon Disable() - for aggregatedMetricName, metricResult := range aggr { - assert.NotEmpty(t, aggregatedMetricName) - scope, metricName, err := base.DisaggregateMetricName(aggregatedMetricName) - assert.NotEmpty(t, metricName) - require.NoError(t, err) - - val, metricResultErr := metricResult.Get() - expectMetricNotCollectedYet := false - switch base.Scope(scope) { - case base.SelfScope: - switch metricName { - case base.DefaultMetricName: - assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" - case base.LagMetricName: - assert.Equalf(t, float64(0.3), val, "scope=%v, metricName=%v", scope, metricName) - case base.ThreadsRunningMetricName: - assert.Equalf(t, float64(26), val, "scope=%v, metricName=%v", scope, metricName) - case base.CustomMetricName: - assert.Equalf(t, float64(17), val, "scope=%v, metricName=%v", scope, metricName) - case base.LoadAvgMetricName: - assert.Equalf(t, float64(2.718), val, "scope=%v, metricName=%v", scope, metricName) - } - case base.ShardScope: - // Replicas will nto report named metrics, since they now assume v20 behavior. They will only - // produce the single v20 metric (which we call "default", though they don't advertise it under the name "base.DefaultMetricName") - switch metricName { - case base.DefaultMetricName: - assert.Equalf(t, float64(0.339), val, "scope=%v, metricName=%v", scope, metricName) // same value as "lag" - case base.LagMetricName: - assert.Equalf(t, float64(0.339), val, "scope=%v, metricName=%v", scope, metricName) // - default: - assert.Zero(t, val, "scope=%v, metricName=%v", scope, metricName) - expectMetricNotCollectedYet = true - } - default: - assert.Failf(t, "unknown scope", "scope=%v", scope) - } - if expectMetricNotCollectedYet { - assert.ErrorIs(t, metricResultErr, base.ErrNoResultYet) - } else { - assert.NoErrorf(t, metricResultErr, "aggregatedMetricName: %v", aggregatedMetricName) - } - } - assert.NotEmpty(t, tmClient.AppNames()) - // The throttler here emulates a PRIMARY tablet, and therefore should probe the replicas using - // the "vitess" app name. - uniqueNames := map[string]int{} - for _, appName := range tmClient.AppNames() { - uniqueNames[appName]++ - } - // PRIMARY throttler probes replicas with empty app name, which is then - // interpreted as "vitess" name. - _, ok := uniqueNames[""] - assert.Truef(t, ok, "%+v", uniqueNames) - // And that's the only app we expect to see. - assert.Equalf(t, 1, len(uniqueNames), "%+v", uniqueNames) - }) - }) -} - // TestProbesPostDisable runs the throttler for some time, and then investigates the internal throttler maps and values. func TestProbesPostDisable(t *testing.T) { ctx := context.Background() // for development, replace with ctx := utils.LeakCheckContext(t) @@ -1730,8 +1614,7 @@ func TestDormant(t *testing.T) { assert.True(t, throttler.isDormant()) assert.EqualValues(t, 1, heartbeatWriter.Requests()) // once upon Enable() flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) go func() { @@ -1830,14 +1713,12 @@ func TestChecks(t *testing.T) { validateAppNames(t) t.Run("checks, self scope", func(t *testing.T) { flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } t.Run("implicit names", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Equal(t, testAppName.String(), checkResult.AppName) assert.Len(t, checkResult.Metrics, 1) @@ -1846,11 +1727,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - if !assert.EqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) { - for k, v := range checkResult.Metrics { - t.Logf("%s: %+v", k, v) - } - } if !assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) { for k, v := range checkResult.Metrics { t.Logf("%s: %+v", k, v) @@ -1876,7 +1752,6 @@ func TestChecks(t *testing.T) { // "vitess" app always checks all known metrics. flags := &CheckFlags{ // scope not important for this test - MultiMetricsEnabled: true, } t.Run("implicit names, always all known", func(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) @@ -1899,14 +1774,12 @@ func TestChecks(t *testing.T) { t.Run("checks, shard scope", func(t *testing.T) { flags := &CheckFlags{ - Scope: base.ShardScope, - MultiMetricsEnabled: true, + Scope: base.ShardScope, } t.Run("implicit names", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, testAppName.String(), checkResult.AppName) @@ -1916,7 +1789,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, testAppName.String(), checkResult.AppName) @@ -1937,13 +1809,11 @@ func TestChecks(t *testing.T) { t.Run("checks, undefined scope", func(t *testing.T) { flags := &CheckFlags{ // Leaving scope undefined, so that each metrics picks its own scope - MultiMetricsEnabled: true, } t.Run("implicit names", func(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Len(t, checkResult.Metrics, 1) @@ -1952,7 +1822,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), base.KnownMetricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) @@ -1974,8 +1843,7 @@ func TestChecks(t *testing.T) { }) t.Run("checks, defined scope masks explicit scope metrics", func(t *testing.T) { flags := &CheckFlags{ - Scope: base.ShardScope, - MultiMetricsEnabled: true, + Scope: base.ShardScope, } t.Run("explicit names", func(t *testing.T) { metricNames := base.MetricNames{ @@ -1992,7 +1860,6 @@ func TestChecks(t *testing.T) { require.NotNil(t, checkResult) assert.EqualValues(t, 0.9, checkResult.Value) // shard lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.ErrorIs(t, checkResult.Error, base.ErrThresholdExceeded) assert.Equal(t, len(metricNames), len(checkResult.Metrics)) @@ -2012,7 +1879,6 @@ func TestChecks(t *testing.T) { t.Run("checks, undefined scope and explicit scope metrics", func(t *testing.T) { flags := &CheckFlags{ // Leaving scope undefined - MultiMetricsEnabled: true, } t.Run("explicit names", func(t *testing.T) { metricNames := base.MetricNames{ @@ -2024,7 +1890,6 @@ func TestChecks(t *testing.T) { checkResult := throttler.Check(ctx, testAppName.String(), metricNames, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // explicitly set self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Equal(t, len(metricNames), len(checkResult.Metrics)) @@ -2061,8 +1926,7 @@ func TestReplica(t *testing.T) { runThrottler(t, ctx, throttler, time.Minute, func(t *testing.T, ctx context.Context) { assert.Empty(t, tmClient.AppNames()) flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: true, + Scope: base.SelfScope, } { checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) @@ -2087,7 +1951,6 @@ func TestReplica(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) select { @@ -2105,7 +1968,6 @@ func TestReplica(t *testing.T) { checkResult := throttler.Check(ctx, throttlerapp.OnlineDDLName.String(), nil, flags) require.NotNil(t, checkResult) assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) assert.Len(t, checkResult.Metrics, 1) assert.True(t, checkResult.RecentlyChecked) @@ -2113,7 +1975,6 @@ func TestReplica(t *testing.T) { { recentApp, ok := throttler.recentAppsSnapshot()[throttlerapp.OnlineDDLName.String()] require.True(t, ok) - assert.EqualValues(t, http.StatusOK, recentApp.StatusCode) assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, recentApp.ResponseCode) } } @@ -2144,29 +2005,9 @@ func TestReplica(t *testing.T) { require.NotNil(t, checkResult) // loadavg value exceeds threshold. This will show up in the check result as an error. assert.EqualValues(t, 2.718, checkResult.Value, "unexpected result: %+v", checkResult) // self lag value - assert.NotEqualValues(t, http.StatusOK, checkResult.StatusCode, "unexpected result: %+v", checkResult) assert.NotEqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode, "unexpected result: %+v", checkResult) assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) }) - t.Run("validate v20 non-multi-metric results", func(t *testing.T) { - flags := &CheckFlags{ - Scope: base.SelfScope, - MultiMetricsEnabled: false, - } - checkResult := throttler.Check(ctx, throttlerapp.VitessName.String(), nil, flags) - require.NotNil(t, checkResult) - // loadavg value exceeds threshold. But since "MultiMetricsEnabled: false", the - // throttler, acting as a replica, assumes it's being probed by a v20 primary, and - // therefore does not report any of the multi-metric errors back. It only ever - // reports the default metric. - assert.EqualValues(t, 0.3, checkResult.Value) // self lag value - assert.EqualValues(t, http.StatusOK, checkResult.StatusCode) - assert.EqualValues(t, tabletmanagerdatapb.CheckThrottlerResponseCode_OK, checkResult.ResponseCode) - assert.EqualValues(t, 0.75, checkResult.Threshold) - // The replica will still report the multi-metrics, and that's fine. As long - // as it does not reflect any of their values in the checkResult.Value/StatusCode/Threshold/Error/Message. - assert.Equal(t, len(base.KnownMetricNames), len(checkResult.Metrics)) - }) }) t.Run("metrics", func(t *testing.T) { diff --git a/proto/tabletmanagerdata.proto b/proto/tabletmanagerdata.proto index 9ca4eb11b06..cda173ac044 100644 --- a/proto/tabletmanagerdata.proto +++ b/proto/tabletmanagerdata.proto @@ -824,9 +824,8 @@ message CheckThrottlerRequest { bool skip_request_heartbeats = 3; // OKIfNotExists asks the throttler to return OK even if the metric does not exist bool ok_if_not_exists = 4; - // MultiMetricsEnabled is always set to "true" and is how a multi-metrics enabled replica - // throttler knows its being probed by a multi-metrics enabled primary vttablet. - bool multi_metrics_enabled = 5; + reserved 5; // used to be multi_metrics_enabled, introduced in v21 for backwards compatibility, and removed in v22 + reserved "multi_metrics_enabled"; } enum CheckThrottlerResponseCode { @@ -839,8 +838,8 @@ enum CheckThrottlerResponseCode { } message CheckThrottlerResponse { - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - int32 status_code = 1; + reserved 1; // was `status_code`, HTTP compliant, deprecated + reserved "status_code"; // Value is the metric value collected by the tablet double value = 2; // Threshold is the throttling threshold the table was comparing the value with @@ -856,8 +855,7 @@ message CheckThrottlerResponse { message Metric { // Name of the metric string name = 1; - // StatusCode is HTTP compliant response code (e.g. 200 for OK) - int32 status_code = 2; + reserved 2; // was `status_code`, HTTP compliant, deprecated // Value is the metric value collected by the tablet double value = 3; // Threshold is the throttling threshold the table was comparing the value with @@ -940,7 +938,7 @@ message GetThrottlerStatusResponse { message RecentApp { vttime.Time checked_at = 1; - int32 status_code = 2; + reserved 2; // was HTTP `status_code`, deprecated // ResponseCode is the enum representation of the response CheckThrottlerResponseCode response_code = 3; } diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 0a946386995..ecaee6885f3 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -35130,9 +35130,6 @@ export namespace tabletmanagerdata { /** CheckThrottlerRequest ok_if_not_exists */ ok_if_not_exists?: (boolean|null); - - /** CheckThrottlerRequest multi_metrics_enabled */ - multi_metrics_enabled?: (boolean|null); } /** Represents a CheckThrottlerRequest. */ @@ -35156,9 +35153,6 @@ export namespace tabletmanagerdata { /** CheckThrottlerRequest ok_if_not_exists. */ public ok_if_not_exists: boolean; - /** CheckThrottlerRequest multi_metrics_enabled. */ - public multi_metrics_enabled: boolean; - /** * Creates a new CheckThrottlerRequest instance using the specified properties. * @param [properties] Properties to set @@ -35250,9 +35244,6 @@ export namespace tabletmanagerdata { /** Properties of a CheckThrottlerResponse. */ interface ICheckThrottlerResponse { - /** CheckThrottlerResponse status_code */ - status_code?: (number|null); - /** CheckThrottlerResponse value */ value?: (number|null); @@ -35290,9 +35281,6 @@ export namespace tabletmanagerdata { */ constructor(properties?: tabletmanagerdata.ICheckThrottlerResponse); - /** CheckThrottlerResponse status_code. */ - public status_code: number; - /** CheckThrottlerResponse value. */ public value: number; @@ -35406,9 +35394,6 @@ export namespace tabletmanagerdata { /** Metric name */ name?: (string|null); - /** Metric status_code */ - status_code?: (number|null); - /** Metric value */ value?: (number|null); @@ -35440,9 +35425,6 @@ export namespace tabletmanagerdata { /** Metric name. */ public name: string; - /** Metric status_code. */ - public status_code: number; - /** Metric value. */ public value: number; @@ -36044,9 +36026,6 @@ export namespace tabletmanagerdata { /** RecentApp checked_at */ checked_at?: (vttime.ITime|null); - /** RecentApp status_code */ - status_code?: (number|null); - /** RecentApp response_code */ response_code?: (tabletmanagerdata.CheckThrottlerResponseCode|null); } @@ -36063,9 +36042,6 @@ export namespace tabletmanagerdata { /** RecentApp checked_at. */ public checked_at?: (vttime.ITime|null); - /** RecentApp status_code. */ - public status_code: number; - /** RecentApp response_code. */ public response_code: tabletmanagerdata.CheckThrottlerResponseCode; diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index cc3ef73ced6..ca1cb4f0ab8 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -81562,7 +81562,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * @property {string|null} [scope] CheckThrottlerRequest scope * @property {boolean|null} [skip_request_heartbeats] CheckThrottlerRequest skip_request_heartbeats * @property {boolean|null} [ok_if_not_exists] CheckThrottlerRequest ok_if_not_exists - * @property {boolean|null} [multi_metrics_enabled] CheckThrottlerRequest multi_metrics_enabled */ /** @@ -81612,14 +81611,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { */ CheckThrottlerRequest.prototype.ok_if_not_exists = false; - /** - * CheckThrottlerRequest multi_metrics_enabled. - * @member {boolean} multi_metrics_enabled - * @memberof tabletmanagerdata.CheckThrottlerRequest - * @instance - */ - CheckThrottlerRequest.prototype.multi_metrics_enabled = false; - /** * Creates a new CheckThrottlerRequest instance using the specified properties. * @function create @@ -81652,8 +81643,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skip_request_heartbeats); if (message.ok_if_not_exists != null && Object.hasOwnProperty.call(message, "ok_if_not_exists")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ok_if_not_exists); - if (message.multi_metrics_enabled != null && Object.hasOwnProperty.call(message, "multi_metrics_enabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.multi_metrics_enabled); return writer; }; @@ -81704,10 +81693,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.ok_if_not_exists = reader.bool(); break; } - case 5: { - message.multi_metrics_enabled = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -81755,9 +81740,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (message.ok_if_not_exists != null && message.hasOwnProperty("ok_if_not_exists")) if (typeof message.ok_if_not_exists !== "boolean") return "ok_if_not_exists: boolean expected"; - if (message.multi_metrics_enabled != null && message.hasOwnProperty("multi_metrics_enabled")) - if (typeof message.multi_metrics_enabled !== "boolean") - return "multi_metrics_enabled: boolean expected"; return null; }; @@ -81781,8 +81763,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.skip_request_heartbeats = Boolean(object.skip_request_heartbeats); if (object.ok_if_not_exists != null) message.ok_if_not_exists = Boolean(object.ok_if_not_exists); - if (object.multi_metrics_enabled != null) - message.multi_metrics_enabled = Boolean(object.multi_metrics_enabled); return message; }; @@ -81804,7 +81784,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.scope = ""; object.skip_request_heartbeats = false; object.ok_if_not_exists = false; - object.multi_metrics_enabled = false; } if (message.app_name != null && message.hasOwnProperty("app_name")) object.app_name = message.app_name; @@ -81814,8 +81793,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.skip_request_heartbeats = message.skip_request_heartbeats; if (message.ok_if_not_exists != null && message.hasOwnProperty("ok_if_not_exists")) object.ok_if_not_exists = message.ok_if_not_exists; - if (message.multi_metrics_enabled != null && message.hasOwnProperty("multi_metrics_enabled")) - object.multi_metrics_enabled = message.multi_metrics_enabled; return object; }; @@ -81876,7 +81853,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * Properties of a CheckThrottlerResponse. * @memberof tabletmanagerdata * @interface ICheckThrottlerResponse - * @property {number|null} [status_code] CheckThrottlerResponse status_code * @property {number|null} [value] CheckThrottlerResponse value * @property {number|null} [threshold] CheckThrottlerResponse threshold * @property {string|null} [error] CheckThrottlerResponse error @@ -81904,14 +81880,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { this[keys[i]] = properties[keys[i]]; } - /** - * CheckThrottlerResponse status_code. - * @member {number} status_code - * @memberof tabletmanagerdata.CheckThrottlerResponse - * @instance - */ - CheckThrottlerResponse.prototype.status_code = 0; - /** * CheckThrottlerResponse value. * @member {number} value @@ -82008,8 +81976,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { CheckThrottlerResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status_code); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) @@ -82065,10 +82031,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { while (reader.pos < end) { let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.status_code = reader.int32(); - break; - } case 2: { message.value = reader.double(); break; @@ -82159,9 +82121,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { CheckThrottlerResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; @@ -82220,8 +82179,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (object instanceof $root.tabletmanagerdata.CheckThrottlerResponse) return object; let message = new $root.tabletmanagerdata.CheckThrottlerResponse(); - if (object.status_code != null) - message.status_code = object.status_code | 0; if (object.value != null) message.value = Number(object.value); if (object.threshold != null) @@ -82297,7 +82254,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (options.objects || options.defaults) object.metrics = {}; if (options.defaults) { - object.status_code = 0; object.value = 0; object.threshold = 0; object.error = ""; @@ -82307,8 +82263,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { object.summary = ""; object.response_code = options.enums === String ? "UNDEFINED" : 0; } - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; if (message.threshold != null && message.hasOwnProperty("threshold")) @@ -82367,7 +82321,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * @memberof tabletmanagerdata.CheckThrottlerResponse * @interface IMetric * @property {string|null} [name] Metric name - * @property {number|null} [status_code] Metric status_code * @property {number|null} [value] Metric value * @property {number|null} [threshold] Metric threshold * @property {string|null} [error] Metric error @@ -82399,14 +82352,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { */ Metric.prototype.name = ""; - /** - * Metric status_code. - * @member {number} status_code - * @memberof tabletmanagerdata.CheckThrottlerResponse.Metric - * @instance - */ - Metric.prototype.status_code = 0; - /** * Metric value. * @member {number} value @@ -82481,8 +82426,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status_code); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.value); if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) @@ -82533,10 +82476,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.name = reader.string(); break; } - case 2: { - message.status_code = reader.int32(); - break; - } case 3: { message.value = reader.double(); break; @@ -82599,9 +82538,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; @@ -82646,8 +82582,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { let message = new $root.tabletmanagerdata.CheckThrottlerResponse.Metric(); if (object.name != null) message.name = String(object.name); - if (object.status_code != null) - message.status_code = object.status_code | 0; if (object.value != null) message.value = Number(object.value); if (object.threshold != null) @@ -82708,7 +82642,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { let object = {}; if (options.defaults) { object.name = ""; - object.status_code = 0; object.value = 0; object.threshold = 0; object.error = ""; @@ -82718,8 +82651,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; if (message.threshold != null && message.hasOwnProperty("threshold")) @@ -84249,7 +84180,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { * @memberof tabletmanagerdata.GetThrottlerStatusResponse * @interface IRecentApp * @property {vttime.ITime|null} [checked_at] RecentApp checked_at - * @property {number|null} [status_code] RecentApp status_code * @property {tabletmanagerdata.CheckThrottlerResponseCode|null} [response_code] RecentApp response_code */ @@ -84276,14 +84206,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { */ RecentApp.prototype.checked_at = null; - /** - * RecentApp status_code. - * @member {number} status_code - * @memberof tabletmanagerdata.GetThrottlerStatusResponse.RecentApp - * @instance - */ - RecentApp.prototype.status_code = 0; - /** * RecentApp response_code. * @member {tabletmanagerdata.CheckThrottlerResponseCode} response_code @@ -84318,8 +84240,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { writer = $Writer.create(); if (message.checked_at != null && Object.hasOwnProperty.call(message, "checked_at")) $root.vttime.Time.encode(message.checked_at, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status_code); if (message.response_code != null && Object.hasOwnProperty.call(message, "response_code")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.response_code); return writer; @@ -84360,10 +84280,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { message.checked_at = $root.vttime.Time.decode(reader, reader.uint32()); break; } - case 2: { - message.status_code = reader.int32(); - break; - } case 3: { message.response_code = reader.int32(); break; @@ -84408,9 +84324,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { if (error) return "checked_at." + error; } - if (message.status_code != null && message.hasOwnProperty("status_code")) - if (!$util.isInteger(message.status_code)) - return "status_code: integer expected"; if (message.response_code != null && message.hasOwnProperty("response_code")) switch (message.response_code) { default: @@ -84443,8 +84356,6 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { throw TypeError(".tabletmanagerdata.GetThrottlerStatusResponse.RecentApp.checked_at: object expected"); message.checked_at = $root.vttime.Time.fromObject(object.checked_at); } - if (object.status_code != null) - message.status_code = object.status_code | 0; switch (object.response_code) { default: if (typeof object.response_code === "number") { @@ -84495,13 +84406,10 @@ export const tabletmanagerdata = $root.tabletmanagerdata = (() => { let object = {}; if (options.defaults) { object.checked_at = null; - object.status_code = 0; object.response_code = options.enums === String ? "UNDEFINED" : 0; } if (message.checked_at != null && message.hasOwnProperty("checked_at")) object.checked_at = $root.vttime.Time.toObject(message.checked_at, options); - if (message.status_code != null && message.hasOwnProperty("status_code")) - object.status_code = message.status_code; if (message.response_code != null && message.hasOwnProperty("response_code")) object.response_code = options.enums === String ? $root.tabletmanagerdata.CheckThrottlerResponseCode[message.response_code] === undefined ? message.response_code : $root.tabletmanagerdata.CheckThrottlerResponseCode[message.response_code] : message.response_code; return object;