diff --git a/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/ArtifactPreloadPlanServiceImpl.kt b/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/ArtifactPreloadPlanServiceImpl.kt index 833a76c4a4..5afc6559e2 100644 --- a/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/ArtifactPreloadPlanServiceImpl.kt +++ b/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/ArtifactPreloadPlanServiceImpl.kt @@ -162,6 +162,7 @@ class ArtifactPreloadPlanServiceImpl( size = node.size, strategy = strategy ) + logger.info("generate preload plan for sha256[${node.sha256}]") generator.generate(param) } } diff --git a/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/DefaultPreloadPlanExecutor.kt b/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/DefaultPreloadPlanExecutor.kt index 2c810a7263..92393b1e49 100644 --- a/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/DefaultPreloadPlanExecutor.kt +++ b/src/backend/common/common-artifact/artifact-cache/src/main/kotlin/com/tencent/bkrepo/common/artifact/cache/service/impl/DefaultPreloadPlanExecutor.kt @@ -97,11 +97,11 @@ class DefaultPreloadPlanExecutor( fun load(plan: ArtifactPreloadPlan, credentials: StorageCredentials, listener: PreloadListener?) { try { + logger.info("preload start, ${plan.artifactInfo()}") + listener?.onPreloadStart(plan) if (System.currentTimeMillis() - plan.executeTime > preloadProperties.planTimeout.toMillis()) { throw RuntimeException("plan timeout[${plan.executeTime}], ${plan.artifactInfo()}") } - logger.info("preload start, ${plan.artifactInfo()}") - listener?.onPreloadStart(plan) val cacheFile = Paths.get(credentials.cache.path, fileLocator.locate(plan.sha256), plan.sha256) val cacheFileLock = Paths.get(credentials.cache.path, StringPool.TEMP, "${plan.sha256}.locked") val throughput = if (cacheFile.existReal()) {