From e5dcd6aada56991feaab5054dfe7ea4d960946d4 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 7 Apr 2023 06:01:36 +0800 Subject: [PATCH] Delete deleted release attachments immediately from storage (#23913) Previously, deleted release attachments were kept forever on the external storage. Note: It may be very slow now if there are many attachments to be deleted on this release. Fix #23728 --- services/release/release.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/release/release.go b/services/release/release.go index eec03b46883e..a9a523119776 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -227,7 +227,7 @@ func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_mod deletedUUIDs.Add(attach.UUID) } - if _, err := repo_model.DeleteAttachments(ctx, attachments, false); err != nil { + if _, err := repo_model.DeleteAttachments(ctx, attachments, true); err != nil { return fmt.Errorf("DeleteAttachments [uuids: %v]: %w", delAttachmentUUIDs, err) } }