From 341b3c4ad2e065a09a5c1e7ee633974a57d19039 Mon Sep 17 00:00:00 2001 From: yaoxuwan Date: Mon, 18 Nov 2024 11:25:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20edge=E8=B0=83=E7=94=A8center=20feign?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E8=B6=85=E6=97=B6=E5=90=8E=EF=BC=8Cedge?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E9=80=BB=E8=BE=91=E9=9C=80=E8=A6=81=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E6=89=A7=E8=A1=8C=20#2749?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bkrepo/common/metadata/util/ClusterUtils.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/util/ClusterUtils.kt b/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/util/ClusterUtils.kt index 36232bf192..3686de5a29 100644 --- a/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/util/ClusterUtils.kt +++ b/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/util/ClusterUtils.kt @@ -38,6 +38,7 @@ import com.tencent.bkrepo.common.service.cluster.properties.ClusterProperties import com.tencent.bkrepo.common.service.exception.RemoteErrorCodeException import com.tencent.bkrepo.common.service.util.HeaderUtils import com.tencent.bkrepo.common.service.util.SpringContextUtils +import feign.RetryableException import org.slf4j.LoggerFactory import org.springframework.util.AntPathMatcher @@ -154,6 +155,11 @@ object ClusterUtils { if (!messageCodes.map { it.getCode() }.contains(e.errorCode)) { throw e } + } catch (e: RetryableException) { + if (e.message?.contains("Read time out") == true) { + logger.info("ignore feign exception: ${e.message}") + } + throw e } } }