Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change order of the file deletion process + not deleting database records #19

Closed
prawnsalad opened this issue May 3, 2018 · 0 comments · Fixed by #21
Closed

Change order of the file deletion process + not deleting database records #19

prawnsalad opened this issue May 3, 2018 · 0 comments · Fixed by #21
Assignees

Comments

@prawnsalad
Copy link
Member

This should delete from the filesystem before deleting from the database. If the application crashes or the binary does not get deleted for some reason, we can then flag it in the database as an error occurred and it will be retried in the next GC run.

Secondly, we could do with a deleted flag rather than deleting the row entirely so that we have records for abuse monitoring etc. We can manually set a purge for deleted file rows by some other means to keep it clean.

https://github.com/kiwiirc/plugin-fileuploader/blob/master/shardedfilestore/shardedfilestore.go#L217-L225

vith added a commit that referenced this issue May 9, 2018
also: only set a deleted flag instead of removing the db row

closes #19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants