Skip to content
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

VStreams NOT_FOUND Error Retries and Omits Tablet #154

Merged
merged 4 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go/vt/vtgate/vstream_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ func (vs *vstream) shouldRetry(err error) (bool, bool) {

// If there is a GTIDSet Mismatch on the tablet, omit it from the candidate
// list in the TabletPicker on retry.
if errCode == vtrpcpb.Code_INVALID_ARGUMENT && strings.Contains(err.Error(), "GTIDSet Mismatch") {
if (errCode == vtrpcpb.Code_INVALID_ARGUMENT && strings.Contains(err.Error(), "GTIDSet Mismatch")) ||
errCode == vtrpc.Code_NOT_FOUND {
return true, true
}

Expand Down
7 changes: 7 additions & 0 deletions go/vt/vtgate/vstream_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,13 @@ func TestVStreamRetriableErrors(t *testing.T) {
shouldRetry: false,
ignoreTablet: false,
},
{
name: "not found",
code: vtrpcpb.Code_NOT_FOUND,
msg: "",
shouldRetry: true,
ignoreTablet: true,
},
}

commit := []*binlogdatapb.VEvent{
Expand Down
Loading