From 0cb76469116a94b9999df7570b504d8c8bd6f597 Mon Sep 17 00:00:00 2001 From: zacYL <100330102+zacYL@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:21:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AccessDeniedException=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=8D=95=E8=8E=B7#2647?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bkrepo/common/storage/monitor/StorageHealthMonitor.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backend/common/common-storage/storage-service/src/main/kotlin/com/tencent/bkrepo/common/storage/monitor/StorageHealthMonitor.kt b/src/backend/common/common-storage/storage-service/src/main/kotlin/com/tencent/bkrepo/common/storage/monitor/StorageHealthMonitor.kt index d2dc9b34e1..2f190b37df 100644 --- a/src/backend/common/common-storage/storage-service/src/main/kotlin/com/tencent/bkrepo/common/storage/monitor/StorageHealthMonitor.kt +++ b/src/backend/common/common-storage/storage-service/src/main/kotlin/com/tencent/bkrepo/common/storage/monitor/StorageHealthMonitor.kt @@ -130,6 +130,13 @@ class StorageHealthMonitor( try { val future = executorService.submit { checker.clean() } future.get(1, TimeUnit.SECONDS) + } catch (exception: ExecutionException) { + val errorMsg = "Clean checker error: $exception" + if (exception.cause is AccessDeniedException) { + logger.error(errorMsg, exception) + } else { + logger.warn(errorMsg, exception) + } } catch (exception: Exception) { logger.warn("Clean checker error: $exception", exception) }