Skip to content

Commit

Permalink
add NOT_FOUND vstream error to retry but omit tablet group (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
makinje16 authored and timvaillancourt committed May 29, 2024
1 parent b3f3b93 commit c63ab98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/vt/vtgate/vstream_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,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 @@ -427,6 +427,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

0 comments on commit c63ab98

Please sign in to comment.