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

Ensure file contents flushed to disk before returning HTTP status #164

Open
leondutoit opened this issue Jun 13, 2023 · 0 comments
Open

Comments

@leondutoit
Copy link
Collaborator

The combination of async writes and random storage errors can result in data loss. One idea to mitigate this without too much of a performance hit would be to stat the file after closing the file descriptor in the implementations of put and patch, and then to compare the bytes to the amount of bytes received (written according to the application), and then if the byte counts do not match, to return 500. Clients would then need to retry the request until successful.

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

No branches or pull requests

1 participant