@@ -1430,9 +1430,11 @@ class NamespaceFS {
1430
1430
1431
1431
if ( this . _is_versioning_suspended ( ) ) {
1432
1432
if ( latest_ver_info ?. version_id_str === NULL_VERSION_ID ) {
1433
- dbg . log1 ( 'NamespaceFS._move_to_dest_version suspended: version ID of the latest version is null - the file will be unlinked' ) ;
1434
- await native_fs_utils . safe_unlink ( fs_context , latest_ver_path , latest_ver_info ,
1435
- gpfs_options ?. delete_version , bucket_tmp_dir_path ) ;
1433
+ //on GPFS safe_move overrides the latest object so no need to unlink
1434
+ if ( ! is_gpfs ) {
1435
+ dbg . log1 ( 'NamespaceFS._move_to_dest_version suspended: version ID of the latest version is null - the file will be unlinked' ) ;
1436
+ await native_fs_utils . safe_unlink ( fs_context , latest_ver_path , latest_ver_info , undefined , bucket_tmp_dir_path ) ;
1437
+ }
1436
1438
} else {
1437
1439
// remove a version (or delete marker) with null version ID from .versions/ (if exists)
1438
1440
await this . _delete_null_version_from_versions_directory ( key , fs_context ) ;
@@ -2981,9 +2983,9 @@ class NamespaceFS {
2981
2983
undefined ;
2982
2984
const bucket_tmp_dir_path = this . get_bucket_tmpdir_full_path ( ) ;
2983
2985
await native_fs_utils . safe_unlink ( fs_context , null_versioned_path , null_versioned_path_info ,
2984
- gpfs_options , bucket_tmp_dir_path ) ;
2986
+ gpfs_options ?. delete_version , bucket_tmp_dir_path ) ;
2985
2987
2986
- if ( gpfs_options ) await this . _close_files_gpfs ( fs_context , gpfs_options . delete_version , undefined , true ) ;
2988
+ if ( gpfs_options ) await this . _close_files_gpfs ( fs_context , gpfs_options ? .delete_version , undefined , true ) ;
2987
2989
}
2988
2990
break ;
2989
2991
} catch ( err ) {
0 commit comments