-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Background job to cleanup leftover chunked uploads #12227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense so far 👍
I guess this is addressing #8759 |
@MorrisJobke yes. But this is only for upload using the new chunked upload. However most are now days. |
Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
2768cd6
to
adb2b9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
@MorrisJobke ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense 👍
If a chunked uploads fails for some reason the chunks should be cleaned up at some point in time. Else they can quickly fillup a disk.
When a chunked collection is created a backgroundjob is inserted.
This job is deleted when the chunked upload completes sucsessfully
The job will check if all files have an mtime of more than 24 hours. If so it will kill the folder. So as long as you upload 1 chunk every 24 hours it will not kill them.
TODO:
CC: @MorrisJobke since we discussed this recently