Skip to content

Commit e2773ba

Browse files
authored
Merge pull request #8829 from nadavMiz/nested_key_delete
NSFS | versioning | fix nested object concurrency issue
2 parents 0fb2644 + 48a908e commit e2773ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sdk/namespace_fs.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,8 @@ class NamespaceFS {
14451445
// will retry renaming a file in case of parallel deleting of the destination path
14461446
for (;;) {
14471447
try {
1448-
await native_fs_utils._make_path_dirs(dest_path, fs_context);
14491448
if (this._is_versioning_disabled() || is_dir_content_optimized_flow) {
1449+
await native_fs_utils._make_path_dirs(dest_path, fs_context);
14501450
if (open_mode === 'wt') {
14511451
await target_file.linkfileat(fs_context, dest_path);
14521452
} else {
@@ -1495,6 +1495,8 @@ class NamespaceFS {
14951495
try {
14961496
let new_ver_info;
14971497
let latest_ver_info;
1498+
// dir might be deleted by other thread. will recreacte if missing
1499+
await native_fs_utils._make_path_dirs(latest_ver_path, fs_context);
14981500
if (is_gpfs) {
14991501
const latest_ver_info_exist = await native_fs_utils.is_path_exists(fs_context, latest_ver_path);
15001502
gpfs_options = await this._open_files_gpfs(fs_context, new_ver_tmp_path, latest_ver_path, upload_file,

0 commit comments

Comments
 (0)