From dcb9167b96dbc9283c25224fa11289eaf0c95986 Mon Sep 17 00:00:00 2001 From: liuliaozhong Date: Thu, 16 Jan 2025 21:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=90=8C=E4=BB=93=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E7=9B=B8=E5=90=8C=E6=96=87=E4=BB=B6=EF=BC=8C=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=96=87=E4=BB=B6=E6=8A=A5=E9=94=99=20#2930?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bkrepo/preview/model/TPreviewFileCache.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/preview/biz-preview/src/main/kotlin/com/tencent/bkrepo/preview/model/TPreviewFileCache.kt b/src/backend/preview/biz-preview/src/main/kotlin/com/tencent/bkrepo/preview/model/TPreviewFileCache.kt index 2c82b9e96d..90c12db08c 100644 --- a/src/backend/preview/biz-preview/src/main/kotlin/com/tencent/bkrepo/preview/model/TPreviewFileCache.kt +++ b/src/backend/preview/biz-preview/src/main/kotlin/com/tencent/bkrepo/preview/model/TPreviewFileCache.kt @@ -41,7 +41,8 @@ import java.time.LocalDateTime */ @Document("preview_file_cache") @CompoundIndexes( - CompoundIndex(name = "md5_idx", def = "{'md5': 1}", unique = true, background = true), + CompoundIndex(name = "md5_project_repo_idx", def = "{'md5': 1, 'projectId': 1, 'repoName': 1}", unique = true, + background = true), CompoundIndex(name = "created_date_idx", def = "{'createdDate': -1}", background = true) ) data class TPreviewFileCache(