Skip to content
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

Store naming #1528

Merged
merged 3 commits into from May 21, 2024
Merged

Store naming #1528

merged 3 commits into from May 21, 2024

Conversation

G-D-Petrov
Copy link
Collaborator

@G-D-Petrov G-D-Petrov commented Apr 25, 2024

Reference Issues/PRs

What does this implement or fix?

This PR is aiming to provide a way to get the name/identifier of a given store.
This is what the identifier looks like now - s3_storage-us-east-1/test_bucket_1/local/lib-kOGPh-3-True-target-1

  • this applies only to s3 really - {storage_type}-{region}/{bucket}/{perfix or lib_name}
  • for the other stores - {storage_type}-{perfix or lib_name}

Update S3 and Azure library adapter configurations in helper.py

Update storage library classes to include a uid() method

Update AzureStorage class to include container_name_ member variable
cpp/arcticdb/entity/key.cpp Outdated Show resolved Hide resolved
cpp/arcticdb/storage/azure/azure_storage.cpp Show resolved Hide resolved
cpp/arcticdb/storage/library.hpp Outdated Show resolved Hide resolved
cpp/arcticdb/storage/library.hpp Outdated Show resolved Hide resolved
cpp/arcticdb/storage/s3/nfs_backed_storage.cpp Outdated Show resolved Hide resolved
@@ -300,6 +300,10 @@ bool do_key_exists_impl(
}
} //namespace detail

std::string AzureStorage::name() const {
return fmt::format("azure_storage-{}/{}", root_folder_, container_name_);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these the right way round?

@@ -168,7 +168,8 @@ class Library {
}

std::string name() {
return library_path_.to_delim_path();
auto lib_name = storages_->name();
return lib_name;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just return storages_->name();?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way it is easier to debug (at least in VSCode) and shouldn't really make a difference in a release build

@G-D-Petrov G-D-Petrov merged commit 487be9e into master May 21, 2024
110 of 111 checks passed
@G-D-Petrov G-D-Petrov deleted the store_naming branch May 21, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants