Skip to content

Commit

Permalink
Merge pull request #8829 from nadavMiz/nested_key_delete
Browse files Browse the repository at this point in the history
NSFS | versioning | fix nested object concurrency issue
  • Loading branch information
nadavMiz authored Feb 26, 2025
2 parents 0fb2644 + 48a908e commit e2773ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sdk/namespace_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,8 @@ class NamespaceFS {
// will retry renaming a file in case of parallel deleting of the destination path
for (;;) {
try {
await native_fs_utils._make_path_dirs(dest_path, fs_context);
if (this._is_versioning_disabled() || is_dir_content_optimized_flow) {
await native_fs_utils._make_path_dirs(dest_path, fs_context);
if (open_mode === 'wt') {
await target_file.linkfileat(fs_context, dest_path);
} else {
Expand Down Expand Up @@ -1495,6 +1495,8 @@ class NamespaceFS {
try {
let new_ver_info;
let latest_ver_info;
// dir might be deleted by other thread. will recreacte if missing
await native_fs_utils._make_path_dirs(latest_ver_path, fs_context);
if (is_gpfs) {
const latest_ver_info_exist = await native_fs_utils.is_path_exists(fs_context, latest_ver_path);
gpfs_options = await this._open_files_gpfs(fs_context, new_ver_tmp_path, latest_ver_path, upload_file,
Expand Down

0 comments on commit e2773ba

Please sign in to comment.