Skip to content

Commit 2396533

Browse files
committed
NSFS | GPFS | fix put object over null version in suspended mode
Signed-off-by: nadav mizrahi <nadav.mizrahi16@gmail.com>
1 parent 3c8a29a commit 2396533

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/sdk/namespace_fs.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,15 +1427,16 @@ class NamespaceFS {
14271427
dbg.log1('Namespace_fs._move_to_dest_version:', latest_ver_info, new_ver_info, gpfs_options);
14281428

14291429
if (this._is_versioning_suspended()) {
1430-
if (latest_ver_info?.version_id_str === NULL_VERSION_ID) {
1430+
//on GPFS safe_move overrides the latest object so no need to unlink
1431+
if (!is_gpfs && latest_ver_info?.version_id_str === NULL_VERSION_ID) {
14311432
dbg.log1('NamespaceFS._move_to_dest_version suspended: version ID of the latest version is null - the file will be unlinked');
1432-
await native_fs_utils.safe_unlink(fs_context, latest_ver_path, latest_ver_info,
1433-
gpfs_options?.delete_version, bucket_tmp_dir_path);
1433+
await native_fs_utils.safe_unlink(fs_context, latest_ver_path, latest_ver_info, undefined, bucket_tmp_dir_path);
14341434
} else {
14351435
// remove a version (or delete marker) with null version ID from .versions/ (if exists)
14361436
await this._delete_null_version_from_versions_directory(key, fs_context);
14371437
}
14381438
}
1439+
14391440
if (latest_ver_info &&
14401441
((this._is_versioning_enabled()) ||
14411442
(this._is_versioning_suspended() && latest_ver_info.version_id_str !== NULL_VERSION_ID))) {

0 commit comments

Comments
 (0)