Skip to content

Commit

Permalink
added not found error to retry and omit tablet group.
Browse files Browse the repository at this point in the history
  • Loading branch information
makinje16 committed Nov 6, 2023
1 parent 369b6a1 commit 2a7b91b
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 @@ -720,7 +720,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 == vtrpcpb.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 @@ -424,6 +424,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 2a7b91b

Please sign in to comment.