WIP: Remove uploaded file when secondary receives an upload_deleted_event
What does this MR do?
Deletes the file from the Geo secondary when it receives an upload_deleted_event
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Currently we only remove the entry from the 'FileRegistry' table. We also need to cleanup the local storage.
This is a follow-on to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3635. We need certain key merges (such as https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4363, https://gitlab.com/gitlab-org/gitlab-ce/issues/42547, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16779) as they fix certain issues with the uploads table.
Also, based on this discussion https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3635#note_58016503
Currently, we have a
file_registry
event per deleted file, but no way of getting from that file registry to the file on disk that needs deleting, so I don't think there's any value in keeping this state of affairs going on longer than necessary.We'll still need a onetime migration to remove those bad rows, but let's handle that in a follow-up
-
Create a one-time migration to to remove old file_registry
rows... -
Review discussion https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3635#note_58016936
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #2103 (closed)