diff --git a/docs/semantics.md b/docs/semantics.md index 6a47e89f49..5c977ac8fb 100644 --- a/docs/semantics.md +++ b/docs/semantics.md @@ -8,11 +8,30 @@ Files that have not been modified are read portion by portion on demand. Cloud S **Writes** -For modifications to existing objects, Cloud Storage FUSE downloads the entire backing object's contents from Cloud Storage. The contents are stored in a local temporary file whose location is controlled by the flag ```--temp-dir```. Later, when the file is closed or fsync'd, Cloud Storage FUSE writes the contents of the local file back to Cloud Storage as a new object generation. Modifying even a single bit of an object results in the full re-upload of the object. The exception is if an append is done to the end of a file, where the original file is at least 2MB, then only the appended content is uploaded. - -For new objects, objects are first written to the same temporary directory as mentioned above, and you will notice an empty file is created in the Cloud Storage bucket as a hold. Upon closing or fsyncing the file, the file is then written to your Cloud Storage bucket, with the existing empty file now reflecting the accurate file size and content. - -As new and modified files are fully staged in the local temporary directory until they are written out to Cloud Storage from being closed or fsync'd, you must ensure that there is enough free space available to handle staged content when writing large files. +For modifications to existing objects, Cloud Storage FUSE downloads the entire +backing object's contents from Cloud Storage. The contents are stored in a local +temporary file whose location is controlled by the flag ```--temp-dir```. Later, +when the file is closed or fsync'd, Cloud Storage FUSE writes the contents of +the local file back to Cloud Storage as a new object generation. Modifying even +a single bit of an object results in the full re-upload of the object. The +exception is if an append is done to the end of a file, where the original file +is at least 2MB, then only the appended content is uploaded. + +For new objects, objects are first written to the same temporary directory as +mentioned above. Upon closing or fsyncing the file, the file is then written to +your Cloud Storage bucket. +As new and modified files are fully staged in the local temporary directory +until they are written out to Cloud Storage from being closed or fsync'd, you +must ensure that there is enough free space available to handle staged content +when writing large files.\ +**Note:** Prior to version 1.2.0, you will notice that an empty file is created +in the Cloud Storage bucket as a hold. Upon closing or fsyncing the file, the +file is written to your Cloud Storage bucket, with the existing empty file now +reflecting the accurate file size and content. Starting with version 1.2, the +default behavior is to not create this zero-byte file, which increases write +performance. If needed, it can be re-enabled by setting +the `create-empty-file: true` configuration in the [config file](TODO: link +public documentation here). **Concurrency**