Skip to content

Commit c8c8002

Browse files
authored
Merge pull request #8405 from romayalon/romy-concurrency-nested-key
NSFS | Versioning | Concurrency tests
2 parents e24e59a + f84510e commit c8c8002

File tree

3 files changed

+294
-22
lines changed

3 files changed

+294
-22
lines changed

docs/NooBaaNonContainerized/CI&Tests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ The following is a list of `NC jest tests` files -
104104
9. `test_nc_nsfs_account_schema_validation.test.js` - Tests NC account schema validation.
105105
10. `test_nc_nsfs_new_buckets_path_validation.test.js` - Tests new_buckets_path RW access.
106106
11. `test_config_fs.test.js` - Tests ConfigFS methods.
107+
12. `test_nsfs_concurrency` - Tests concurrent operations.
108+
13. `test_versioning_concurrency` - Tests concurrent operations on versioned enabled bucket.
107109

108110
#### nc_index.js File
109111
* The `nc_index.js` is a file that runs several NC and NSFS mocha related tests.

src/sdk/namespace_fs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,9 +2930,9 @@ class NamespaceFS {
29302930
const bucket_tmp_dir_path = this.get_bucket_tmpdir_full_path();
29312931
if (this._is_versioning_enabled() || suspended_and_latest_is_not_null) {
29322932
await native_fs_utils._make_path_dirs(versioned_path, fs_context);
2933-
await native_fs_utils.safe_move(fs_context, latest_ver_path, versioned_path, latest_ver_info,
2933+
await native_fs_utils.safe_move(fs_context, latest_ver_path, versioned_path, latest_ver_info,
29342934
gpfs_options && gpfs_options.delete_version, bucket_tmp_dir_path);
2935-
if (suspended_and_latest_is_not_null) {
2935+
if (suspended_and_latest_is_not_null) {
29362936
// remove a version (or delete marker) with null version ID from .versions/ (if exists)
29372937
await this._delete_null_version_from_versions_directory(params.key, fs_context);
29382938
}
@@ -2945,9 +2945,9 @@ class NamespaceFS {
29452945
}
29462946
break;
29472947
} catch (err) {
2948+
dbg.warn(`NamespaceFS._delete_latest_version: Retrying retries=${retries} latest_ver_path=${latest_ver_path}`, err);
29482949
retries -= 1;
29492950
if (retries <= 0 || !native_fs_utils.should_retry_link_unlink(is_gpfs, err)) throw err;
2950-
dbg.warn(`NamespaceFS._delete_latest_version: Retrying retries=${retries} latest_ver_path=${latest_ver_path}`, err);
29512951
} finally {
29522952
if (gpfs_options) await this._close_files_gpfs(fs_context, gpfs_options.delete_version, undefined, true);
29532953
}

0 commit comments

Comments
 (0)