Skip to content

Commit

Permalink
Delete deleted release attachments immediately from storage (#23913)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lunny authored Apr 6, 2023
1 parent 6e346f8 commit e5dcd6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit e5dcd6a

Please sign in to comment.