diff --git a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/prepare/third/FileWorkerHostService.java b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/prepare/third/FileWorkerHostService.java index 189446a961..33dea15493 100644 --- a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/prepare/third/FileWorkerHostService.java +++ b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/prepare/third/FileWorkerHostService.java @@ -56,7 +56,6 @@ public FileWorkerHostService(HostService hostService) { this.hostService = hostService; } - // 查询file-worker对应主机信息使用60s缓存,避免短时间内多次重复查询 private final LoadingCache, HostDTO> fileWorkerHostCache = CacheBuilder.newBuilder() .maximumSize(1).expireAfterWrite(60, TimeUnit.SECONDS). @@ -93,7 +92,9 @@ private HostDTO parseFileWorkerHost(Long cloudAreaId, String ipProtocol, String } else { hostDTO = ServiceHostDTO.toHostDTO(hostService.getHost(new HostDTO(cloudAreaId, ip))); } - log.debug("host get by ({},{},{}) is {}", ipProtocol, cloudAreaId, ip, hostDTO); + if (log.isDebugEnabled()) { + log.debug("host get by ({},{},{}) is {}", ipProtocol, cloudAreaId, ip, hostDTO); + } return hostDTO; } }