Skip to content

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

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #2103 (closed)

Edited by Brett Walker

Merge request reports