Skip to content

Commit 61ba309

Browse files
committed
NC | NSFS | Versioning | Fix Bug 8333 | Delete object with version id
Signed-off-by: shirady <[email protected]>
1 parent bc77785 commit 61ba309

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sdk/namespace_fs.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,8 @@ class NamespaceFS {
14471447
if (this._is_versioning_suspended()) {
14481448
if (latest_ver_info?.version_id_str === NULL_VERSION_ID) {
14491449
dbg.log1('NamespaceFS._move_to_dest_version suspended: version ID of the latest version is null - the file will be unlinked');
1450-
await native_fs_utils.safe_unlink(fs_context, latest_ver_path, latest_ver_info, gpfs_options, bucket_tmp_dir_path);
1450+
await native_fs_utils.safe_unlink(fs_context, latest_ver_path, latest_ver_info,
1451+
gpfs_options?.delete_version, bucket_tmp_dir_path);
14511452
} else {
14521453
// remove a version (or delete marker) with null version ID from .versions/ (if exists)
14531454
await this._delete_null_version_from_versions_directory(key, fs_context);
@@ -2764,7 +2765,8 @@ class NamespaceFS {
27642765
await this._open_files_gpfs(fs_context, file_path, undefined, undefined, undefined, undefined, true) :
27652766
undefined;
27662767
const bucket_tmp_dir_path = this.get_bucket_tmpdir_full_path();
2767-
await native_fs_utils.safe_unlink(fs_context, file_path, version_info, gpfs_options, bucket_tmp_dir_path);
2768+
await native_fs_utils.safe_unlink(fs_context, file_path, version_info,
2769+
gpfs_options?.delete_version, bucket_tmp_dir_path);
27682770
return { ...version_info, latest: true };
27692771
} else {
27702772
await nb_native().fs.unlink(fs_context, file_path);
@@ -2941,7 +2943,8 @@ class NamespaceFS {
29412943
} else {
29422944
// versioning suspended and version_id is null
29432945
dbg.log1('NamespaceFS._delete_latest_version: suspended mode version ID of the latest version is null - file will be unlinked');
2944-
await native_fs_utils.safe_unlink(fs_context, latest_ver_path, latest_ver_info, gpfs_options, bucket_tmp_dir_path);
2946+
await native_fs_utils.safe_unlink(fs_context, latest_ver_path, latest_ver_info,
2947+
gpfs_options?.delete_version, bucket_tmp_dir_path);
29452948
}
29462949
}
29472950
break;

0 commit comments

Comments
 (0)