+13
−4
Loading
Resolves a race condition where load_internal_info() could attempt to parse a metadata file after its creation, but before its contents were written by save_internal_info(). This would cause a deserialization error on an empty file. This change makes the write operation in save_internal_info() atomic by using a temporary file and renaming it to the final destination. I applied the same fix to two other functions that used non-atomic writes even I did not observe them causing issues in our tests. This builds on the work in https://github.com/s3s-project/s3s/pull/117. Relevant Error Log: ERROR s3s_fs_internal_error: span trace: location: crates/s3s-fs/src/fs.rs:129:19, error: EOF while parsing a value at line 1 column 0