slack-vitess-r14.0.5-dsdefense: Add flag to select tx throttler tablet type (vitessio#12174)#95
Merged
timvaillancourt merged 2 commits intoslack-vitess-r14.0.5-dsdefensefrom Jul 5, 2023
Conversation
slack-vitess-r14.0.5-dsdefense: Add flag to select tx throttler tablet type (vitessio#12174)
8382f2a to
3642d12
Compare
960097c to
b8d1ff9
Compare
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
9162ea9 to
1cee40c
Compare
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
ejortegau
approved these changes
Jul 4, 2023
| case topodatapb.TabletType_REPLICA, topodatapb.TabletType_RDONLY: | ||
| continue | ||
| default: | ||
| return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "unsupported tablet type %q", tabletType) |
There was a problem hiding this comment.
Consider making the error message be more explicit about the problem being with the tablet type for the tx throttler.
Author
There was a problem hiding this comment.
@ejortegau good point 👍. This matches upstream so I'd prefer to keep this PR as-is, but I'll fix this in an upcoming (hopefully final) cleanup PR
Would txThrottler: tablet type %q is not one of supported types replica and rdonly work?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This backports the upstream PR vitessio#12174
A few tweaks needed to be made in this backport because
topoproto.TabletTypeListFlagdoesn't exist in v14, because flag parsing hadn't totally moved togithub.com/spf13/pflag. Specifically, tweaks had to be made to set the flag default in.Init(), which caused some unit tests to fail until they were tweaked as well. Also a "rice box" had to be updated - something that no longer exists on upstreammainRelated Issue(s)
vitessio#12174
Checklist
Deployment Notes