Skip to content

NC | NSFS | Remove fs_root Member in BucketSpaceFS and AccountSpaceFS #8268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/sdk/accountspace_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ class AccountSpaceFS {
config.NSFS_WARN_THRESHOLD_MS,
this.stats?.update_fs_stats
);

this.config_fs = new ConfigFS(config_root, this.config_root_backend, this.fs_context);

// Currently we do not use these properties
this.fs_root = fs_root ?? '';
}

////////////
Expand Down
9 changes: 4 additions & 5 deletions src/sdk/bucketspace_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const bucket_semaphore = new KeysSemaphore(1);
class BucketSpaceFS extends BucketSpaceSimpleFS {
constructor({config_root}, stats) {
super({ fs_root: ''});
this.fs_root = '';
this.config_root = config_root;
this.stats = stats;
this.fs_context = get_process_fs_context(
Expand Down Expand Up @@ -105,7 +104,7 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {

const nsr = {
resource: {
fs_root_path: this.fs_root,
fs_root_path: '',
fs_backend: bucket.fs_backend
},
path: bucket.path
Expand Down Expand Up @@ -152,7 +151,7 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {
}

async check_bucket_config(bucket) {
const bucket_storage_path = path.join(this.fs_root, bucket.path);
const bucket_storage_path = bucket.path;
try {
await nb_native().fs.stat(this.fs_context, bucket_storage_path);
//TODO: Bucket owner check
Expand Down Expand Up @@ -326,8 +325,8 @@ class BucketSpaceFS extends BucketSpaceSimpleFS {

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