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

fix(crash): try to upload a file that will overflow the disk size #619

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xSaurabhx
Copy link

This is a PR for Bug #617

So, Whats Changed?

Check Disk Space Before Upload: Before starting the upload, check if there is enough disk space available.
Retry Mechanism: Implement a retry mechanism that attempts to upload the file a limited number of times.
Clean Up Failed Uploads: Ensure that failed uploads are cleaned up properly to free up disk space.

@0xSaurabhx 0xSaurabhx changed the title fix: try to upload a file that will overflow the disk size #617 fix: try to upload a file that will overflow the disk size Sep 27, 2024
@0xSaurabhx 0xSaurabhx changed the title fix: try to upload a file that will overflow the disk size fix(crash): try to upload a file that will overflow the disk size Sep 27, 2024
@stonith404
Copy link
Owner

Thanks for your contribution, that's a good addition.

I'm not sure if the the retry mechanism is necessary on the backend though. The frontend already retries if a chunk can't get uploaded. I think it would make more sense to stop the retry mechanism in the frontend if the backend returns that the disk is full.

What do you think?

@0xSaurabhx
Copy link
Author

@stonith404 Hey,

I guess the more secure way to handle these things, is on the backend itself.

Also as you said I will update the frontend too.

@stonith404
Copy link
Owner

@0xSaurabhx What would make the retry logic more secure if it is done on the backend?

I don't really see a use case for the backend retry logic because if these steps fail in the backend, it will most likely fail the next time.

If we do the retry logic in the frontend all possible errors get handled like internet connection issues on the client side and backend errors aswell.

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 this pull request may close these issues.

2 participants