@@ -934,7 +934,6 @@ class NamespaceFS {
934
934
let stat ;
935
935
let isDir ;
936
936
let retries = ( this . _is_versioning_enabled ( ) || this . _is_versioning_suspended ( ) ) ? config . NSFS_RENAME_RETRIES : 0 ;
937
- const is_gpfs = native_fs_utils . _is_gpfs ( fs_context ) ;
938
937
try {
939
938
for ( ; ; ) {
940
939
try {
@@ -962,7 +961,7 @@ class NamespaceFS {
962
961
} catch ( err ) {
963
962
dbg . warn ( `NamespaceFS.read_object_md: retrying retries=${ retries } file_path=${ file_path } ` , err ) ;
964
963
retries -= 1 ;
965
- if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( is_gpfs , err ) ) throw err ;
964
+ if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( err ) ) throw err ;
966
965
await P . delay ( get_random_delay ( config . NSFS_RANDOM_DELAY_BASE , 0 , 50 ) ) ;
967
966
}
968
967
}
@@ -1002,7 +1001,6 @@ class NamespaceFS {
1002
1001
try {
1003
1002
await this . _load_bucket ( params , fs_context ) ;
1004
1003
let retries = ( this . _is_versioning_enabled ( ) || this . _is_versioning_suspended ( ) ) ? config . NSFS_RENAME_RETRIES : 0 ;
1005
- const is_gpfs = native_fs_utils . _is_gpfs ( fs_context ) ;
1006
1004
let stat ;
1007
1005
for ( ; ; ) {
1008
1006
try {
@@ -1033,7 +1031,7 @@ class NamespaceFS {
1033
1031
file = null ;
1034
1032
}
1035
1033
retries -= 1 ;
1036
- if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( is_gpfs , err ) ) {
1034
+ if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( err ) ) {
1037
1035
new NoobaaEvent ( NoobaaEvent . OBJECT_GET_FAILED ) . create_event ( params . key ,
1038
1036
{ bucket_path : this . bucket_path , object_name : params . key } , err ) ;
1039
1037
throw err ;
@@ -1526,7 +1524,7 @@ class NamespaceFS {
1526
1524
break ;
1527
1525
} catch ( err ) {
1528
1526
retries -= 1 ;
1529
- const should_retry = native_fs_utils . should_retry_link_unlink ( is_gpfs , err ) ;
1527
+ const should_retry = native_fs_utils . should_retry_link_unlink ( err ) ;
1530
1528
dbg . warn ( `NamespaceFS._move_to_dest_version error: retries=${ retries } should_retry=${ should_retry } ` +
1531
1529
` new_ver_tmp_path=${ new_ver_tmp_path } latest_ver_path=${ latest_ver_path } ` , err ) ;
1532
1530
if ( ! should_retry || retries <= 0 ) throw err ;
@@ -2837,7 +2835,6 @@ class NamespaceFS {
2837
2835
*/
2838
2836
async _delete_single_object_versioned ( fs_context , key , version_id ) {
2839
2837
let retries = config . NSFS_RENAME_RETRIES ;
2840
- const is_gpfs = native_fs_utils . _is_gpfs ( fs_context ) ;
2841
2838
const latest_version_path = this . _get_file_path ( { key } ) ;
2842
2839
for ( ; ; ) {
2843
2840
let file_path ;
@@ -2874,11 +2871,11 @@ class NamespaceFS {
2874
2871
// there are a few concurrency scenarios that might happen we should retry for -
2875
2872
// 1. the version id is the latest, concurrent put will might move the version id from being the latest to .versions/ -
2876
2873
// will throw safe unlink failed on non matching fd (on GPFS) or inode/mtime (on POSIX).
2877
- // 2. the version id is the second latest and stays under .versions/ - on concurrent delete of the latest,
2874
+ // 2. the version id is the second latest and stays under .versions/ - on concurrent delete of the latest,
2878
2875
// the version id might move to be the latest and we will get ENOENT
2879
- // 3. concurrent delete of this version - will get ENOENT, doing a retry will return successfully
2876
+ // 3. concurrent delete of this version - will get ENOENT, doing a retry will return successfully
2880
2877
// after we will see that the version was already deleted
2881
- if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( is_gpfs , err ) ) throw err ;
2878
+ if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( err ) ) throw err ;
2882
2879
await P . delay ( get_random_delay ( config . NSFS_RANDOM_DELAY_BASE , 0 , 50 ) ) ;
2883
2880
} finally {
2884
2881
if ( gpfs_options ) await this . _close_files_gpfs ( fs_context , gpfs_options . delete_version , undefined , true ) ;
@@ -3053,7 +3050,7 @@ class NamespaceFS {
3053
3050
} catch ( err ) {
3054
3051
dbg . warn ( `NamespaceFS._delete_latest_version error: retries=${ retries } latest_ver_path=${ latest_ver_path } ` , err ) ;
3055
3052
retries -= 1 ;
3056
- if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( is_gpfs , err ) ) throw err ;
3053
+ if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( err ) ) throw err ;
3057
3054
await P . delay ( get_random_delay ( config . NSFS_RANDOM_DELAY_BASE , 0 , 50 ) ) ;
3058
3055
} finally {
3059
3056
if ( gpfs_options ) await this . _close_files_gpfs ( fs_context , gpfs_options . delete_version , undefined , true ) ;
@@ -3069,9 +3066,8 @@ class NamespaceFS {
3069
3066
3070
3067
// We can have only one versioned object with null version ID per key.
3071
3068
// It can be latest version, old version in .version/ directory or delete marker
3072
- // This function removes an object version or delete marker with a null version ID inside .version/ directory
3069
+ // This function removes an object version or delete marker with a null version ID inside .version/ directory
3073
3070
async _delete_null_version_from_versions_directory ( key , fs_context ) {
3074
- const is_gpfs = native_fs_utils . _is_gpfs ( fs_context ) ;
3075
3071
const null_versioned_path = this . _get_version_path ( key , NULL_VERSION_ID ) ;
3076
3072
await this . _check_path_in_bucket_boundaries ( fs_context , null_versioned_path ) ;
3077
3073
let gpfs_options ;
@@ -3091,7 +3087,7 @@ class NamespaceFS {
3091
3087
} catch ( err ) {
3092
3088
dbg . warn ( `NamespaceFS._delete_null_version_from_versions_directory error: retries=${ retries } null_versioned_path=${ null_versioned_path } ` , err ) ;
3093
3089
retries -= 1 ;
3094
- if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( is_gpfs , err ) ) throw err ;
3090
+ if ( retries <= 0 || ! native_fs_utils . should_retry_link_unlink ( err ) ) throw err ;
3095
3091
await P . delay ( get_random_delay ( config . NSFS_RANDOM_DELAY_BASE , 0 , 50 ) ) ;
3096
3092
} finally {
3097
3093
if ( gpfs_options ) await this . _close_files_gpfs ( fs_context , gpfs_options . delete_version , undefined , true ) ;
0 commit comments