Optimize VFS::touch
and fix defects and race conditions.
#5285
+37
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SC-53188
SC-53189
SC-54494
This PR updates the implementations of
VFS::touch
for Azure, GCS and Windows to improve performance and fix race conditions:touch
was incorrect and always overwrote the file. This was fixed by adding a request precondition.CREATE_NEW
, but did not mask failures withERROR_FILE_EXISTS
status code. We fix this.Additionally, the documentation of
tiledb_vfs_touch
was updated to mention that the file is created only if it does not exist, matching existing behavior in most VFS implmentations, and the expectations from thetouch
command.Testing coverage was added.
TYPE: BUG
DESC: Fixed
tiledb_vfs_touch
to not overwrite existing files on GCS.TYPE: BUG
DESC: Fixed
tiledb_vfs_touch
to not overwrite existing files or fail on Azure and Windows respectively, under race conditions.TYPE: C_API
DESC: Update documentation of
tiledb_vfs_touch
to specify that existing files are not overwritten, matching the current behavior.