From 7d0bb9cfb27695aecd524fda8a4348e916bbe37a Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Wed, 13 Mar 2024 13:59:42 +0800 Subject: [PATCH] Update errors.go Signed-off-by: heidongxianhua <18207133434@163.com> --- util/errors/errors.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/errors/errors.go b/util/errors/errors.go index 5eae7010461a..2982be216fd7 100644 --- a/util/errors/errors.go +++ b/util/errors/errors.go @@ -38,7 +38,7 @@ func IsTransientErr(err error) bool { isTransientEtcdErr(err) || matchTransientErrPattern(err) || errors.Is(err, NewErrTransient("")) || - strings.Contains(err.Error(), "upper: no more rows in ") + isTransientSqbErr(err) if isTransient { log.Infof("Transient error: %v", err) } else { @@ -124,3 +124,7 @@ func generateErrorString(err error) string { } return errorString } + +func isTransientSqbErr(err error) bool { + return strings.Contains(err.Error(), "upper: no more rows in") +}