From 149146e547b7fd1aef16904a8ef2e47aefb200fd Mon Sep 17 00:00:00 2001 From: Malcolm Akinje Date: Mon, 6 Nov 2023 16:13:07 -0500 Subject: [PATCH] add NOT_FOUND vstream error to retry but omit tablet group --- go/vt/vtgate/vstream_manager.go | 3 ++- go/vt/vtgate/vstream_manager_test.go | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/go/vt/vtgate/vstream_manager.go b/go/vt/vtgate/vstream_manager.go index c19ab82b0ac..0c470bc329d 100644 --- a/go/vt/vtgate/vstream_manager.go +++ b/go/vt/vtgate/vstream_manager.go @@ -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 } diff --git a/go/vt/vtgate/vstream_manager_test.go b/go/vt/vtgate/vstream_manager_test.go index 280665fd37a..e6587d14fe8 100644 --- a/go/vt/vtgate/vstream_manager_test.go +++ b/go/vt/vtgate/vstream_manager_test.go @@ -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{