You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know when BufWriter::shutdown() or flush() fail whether the write has partially succeeded. Ideally I'd like to have a way to upload such that the operation will be atomic, and the file will not end up in a partially-uploaded state.
Specifically, I'd like to have documented what the consequences of an error in flush or shutdown are.
The text was updated successfully, but these errors were encountered:
As for what happens on error, it depends on the error. In most cases the file won't be committed, however, if there was say a network error after the operation completed, an error will be reported but the operation will have succeeded.
TLDR everything is atomic, but as with any distributed system, you can have failures occur after transaction commit.
FWIW if you're concerned about error handling I would recommend avoiding BufWriter, as documented here, as whilst it is still atomic the relationship to the underlying operations is obfuscated
I would like to know when
BufWriter::shutdown()
orflush()
fail whether the write has partially succeeded. Ideally I'd like to have a way to upload such that the operation will be atomic, and the file will not end up in a partially-uploaded state.Specifically, I'd like to have documented what the consequences of an error in
flush
orshutdown
are.The text was updated successfully, but these errors were encountered: