writeFileAtomic optionally syncs to provide durable atomicity
Summary: The current implementation does not guarantee atomicity on power failure or OS crash. For instance, if a crash happens after writing the directory to storage but before writing the file data to storage, then a zero-byte file can result. Provide an optional parameter to sync and provide atomicity in these situations. Adjust comments to reflect the actual guarantees provided. Differential Revision: D19754974 fbshipit-source-id: 5ddb2f3a1b9e72b523ee13937f648e0913c94c2f
Showing
Please register or sign in to comment