Geo: Avoid failed attachment sync entries when the `Upload` record does not exist
I assume this is a race condition like:
- Create upload
- The secondary schedules the upload to be synced
- Delete project
- The secondary fails to sync
These FileRegistry entries are actually already excluded from /admin/geo_nodes stats, so they are as good as marked as synced. They are basically orphans. We can get rid of them.
-
In FileDownloadService, check forUploadrecord, and if it’s missing, don’t create aFileRegistryrecord at all -
Log what happened?
This is marked as technical debt because it isn't hurting anything. It's an easy fix though.
Edited by Michael Kozono