allow tablet picker to exclude specified tablets from its candidate list#14224
Merged
rohit-nayak-ps merged 11 commits intovitessio:mainfrom Oct 23, 2023
Merged
Conversation
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
mattlord
requested changes
Oct 14, 2023
…rter timeout Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
mattlord
approved these changes
Oct 17, 2023
| close(done) | ||
| }() | ||
|
|
||
| Loop: |
Member
There was a problem hiding this comment.
I don't think that this is needed, is it? Since there's only one for loop.
Contributor
Author
There was a problem hiding this comment.
The break statement breaks out of the switch instead of the loop by default, so we had to label the loop
rohit-nayak-ps
approved these changes
Oct 23, 2023
pbibra
added a commit
to slackhq/vitess
that referenced
this pull request
Oct 26, 2023
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
pbibra
added a commit
to slackhq/vitess
that referenced
this pull request
Oct 26, 2023
4 tasks
DeathBorn
added a commit
to vinted/vitess
that referenced
this pull request
Apr 23, 2024
…ndidate list vitessio#14224 Signed-off-by: Vilius Okockis <vilius.okockis@vinted.com>
timvaillancourt
pushed a commit
to slackhq/vitess
that referenced
this pull request
May 29, 2024
…ist (vitessio#14224) Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
4 tasks
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
Allow the
TabletPickerto take in a list of tablets to exclude from its candidate list.This is mainly required in the
VStreamManagerwhen there is a retriable failure streaming from a tablet.Example Scenario:
Previously, a VTGate VStream RPC call could fail on a GTID mismatch error. In this case, the tablet is healthy so a client retry may choose the same one and fail again. This can happen if the cell preference for the tablet picker is local and there is only a single tablet in the VTGate's local cell. Instead, we'd like to retry on this error in addition to marking the tablet as unviable for streaming within this request.
Changes:
ignoreTabletslist toTabletPickerproperties.tp.GetMatchingTabletsto omit a potential candidate if it also appears in theignoreTabletslist.shouldRetry()function in theVStreamManagerwhich has twoboolreturn values. The first represents whether the error should be retried, the second determines whether the tablet on which the error occurred should be ignored as a possible candidate on the retry.vsm.streamFromTabletto checkshouldRetry()upon error and pass in a list ofignoreTabletsto theTabletPicker.Retriable Errors:
Code_UNAVAIALBLE- should retry from before, we will not ignore the tablet on a retry.Code_FAILED_PRECONDITION- should retry from before, we will not ignore the tablet on a retry.Code_INVALID_ARGUMENTwith messageGTIDSet Mismatch- should retry, ignore the tablet on a retry.Related Issue(s)
Checklist