stronglink icon indicating copy to clipboard operation
stronglink copied to clipboard

File deletion

Open btrask opened this issue 9 years ago • 0 comments

We should be able to gracefully handle file deletion.

Deletions will never sync between repositories. Deleting a file only deletes it from the local repository. This is critical for backups, etc.

Right now if a file is manually deleted I think things should mostly just work, but I haven't tested it. There should probably also be a way to remove the related data from the database.

What happens when trying to sync a deleted file is a big issue. If a file is temporarily unavailable, but re-added later, the downstream repository might never notice. To prevent that:

  1. When a file is intentionally deleted, the meta-data in the DB should also be removed or hidden.
  2. When syncing, if we get a file we can't load (status code 404 or 410), we must just stop the sync.
  3. If a once-deleted file is re-added, it should get a new file ID.

We should probably also remove any orphaned meta-files.

btrask avatar Apr 21 '15 22:04 btrask