Geo: Avoid failed attachment sync entries when the `Upload` record does not exist

I assume this is a race condition like:

  1. Create upload
  2. The secondary schedules the upload to be synced
  3. Delete project
  4. 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 for Upload record, and if it’s missing, don’t create a FileRegistry record at all
  • Log what happened?

This is marked as technical debt because it isn't hurting anything. It's an easy fix though.

Edited Mar 02, 2018 by Michael Kozono
Assignee Loading
Time tracking Loading