Skip to content

Commit 68a0cc7

Browse files
authored
Merge pull request #8268 from shirady/nsfs-nc-remove-fs-root-empty-string
NC | NSFS | Remove `fs_root` Member in `BucketSpaceFS` and `AccountSpaceFS`
2 parents 133cbc7 + 0baa3bf commit 68a0cc7

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/sdk/accountspace_fs.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ class AccountSpaceFS {
4747
config.NSFS_WARN_THRESHOLD_MS,
4848
this.stats?.update_fs_stats
4949
);
50-
5150
this.config_fs = new ConfigFS(config_root, this.config_root_backend, this.fs_context);
52-
53-
// Currently we do not use these properties
54-
this.fs_root = fs_root ?? '';
5551
}
5652

5753
////////////

src/sdk/bucketspace_fs.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const bucket_semaphore = new KeysSemaphore(1);
3232
class BucketSpaceFS extends BucketSpaceSimpleFS {
3333
constructor({config_root}, stats) {
3434
super({ fs_root: ''});
35-
this.fs_root = '';
3635
this.config_root = config_root;
3736
this.stats = stats;
3837
this.fs_context = get_process_fs_context(
@@ -105,7 +104,7 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {
105104

106105
const nsr = {
107106
resource: {
108-
fs_root_path: this.fs_root,
107+
fs_root_path: '',
109108
fs_backend: bucket.fs_backend
110109
},
111110
path: bucket.path
@@ -152,7 +151,7 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {
152151
}
153152

154153
async check_bucket_config(bucket) {
155-
const bucket_storage_path = path.join(this.fs_root, bucket.path);
154+
const bucket_storage_path = bucket.path;
156155
try {
157156
await nb_native().fs.stat(this.fs_context, bucket_storage_path);
158157
//TODO: Bucket owner check
@@ -326,8 +325,8 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {
326325

327326
if (namespace_bucket_config.should_create_underlying_storage) {
328327
// 1. delete underlying storage (ULS = Underline Storage)
329-
dbg.log1('BucketSpaceFS.delete_bucket: deleting uls', this.fs_root, namespace_bucket_config.write_resource.path);
330-
const bucket_storage_path = path.join(this.fs_root, namespace_bucket_config.write_resource.path); // includes write_resource.path + bucket name (s3 flow)
328+
dbg.log1('BucketSpaceFS.delete_bucket: deleting uls', namespace_bucket_config.write_resource.path);
329+
const bucket_storage_path = namespace_bucket_config.write_resource.path; // includes write_resource.path + bucket name (s3 flow)
331330
try {
332331
await ns.delete_uls({ name, full_path: bucket_storage_path }, object_sdk);
333332
} catch (err) {

0 commit comments

Comments
 (0)