-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-metrics throttler: post v21 deprecations and changes #16915
base: main
Are you sure you want to change the base?
Multi-metrics throttler: post v21 deprecations and changes #16915
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
…mes) Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
…expiration duration Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16915 +/- ##
==========================================
- Coverage 67.40% 67.39% -0.02%
==========================================
Files 1570 1570
Lines 252903 252834 -69
==========================================
- Hits 170460 170386 -74
- Misses 82443 82448 +5 ☔ View full report in Codecov by Sentry. |
…sociated implementation Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
@@ -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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to have a require.NoError(t, checkErr)
here before the defer, getting rid of the conditional check? Same below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in this case, because this is a wait-for function, and I'm OK ignoring the error as long as the function eventually succeeds within the given timeout. So I don't care that there could be multiple errors, and I don't want to report the test as failed.
@@ -831,8 +829,7 @@ 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about reserving the name too? I'm not sure, just asking. We can always do that later since your comment clearly indicates what the name was. It's also fine to eventually reuse field names, as long the json/text encodings are still usable and sensible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added reserved names.
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Description
Multi metrics throttler was introduced in v21 and was backwards compatible with the v20 single-metric throttler. Compatibility included gRPC, command line flags, etc.
Starting v22, we remove single-metric throttler compatibility. This PR implements various topics seen in:
Changes in this PR:
MultiMetricsEnabled
and its usage. It is assumed to be true in v22.--check-as-check-self
and--cehck-as-check-shard
command line flags and all related implementation.StatusCode
usage.Related Issue(s)
Checklist
Deployment Notes