From 2a7b91b36ff51e974ae2eb039c4bd96aa1f5684e Mon Sep 17 00:00:00 2001 From: Malcolm Akinje Date: Mon, 6 Nov 2023 15:26:15 -0500 Subject: [PATCH] added not found error to retry and 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 ffb8989ca5d..0de6389b695 100644 --- a/go/vt/vtgate/vstream_manager.go +++ b/go/vt/vtgate/vstream_manager.go @@ -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 } diff --git a/go/vt/vtgate/vstream_manager_test.go b/go/vt/vtgate/vstream_manager_test.go index 4c1e9ec6764..2c49dd78fc3 100644 --- a/go/vt/vtgate/vstream_manager_test.go +++ b/go/vt/vtgate/vstream_manager_test.go @@ -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{