Skip to content

Commit

Permalink
add NOT_FOUND vstream error to retry but omit tablet group
Browse files Browse the repository at this point in the history
  • Loading branch information
makinje16 committed Nov 6, 2023
1 parent 577cd41 commit 149146e
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 @@ -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

0 comments on commit 149146e

Please sign in to comment.