Repository navigation
Generate blob ids in Meta Storage - #90538
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [6dc5fa1] Summary: ❌
|
Michicosun
commented
Nov 20, 2025
Comment on lines
+132
to
+144
| std::string generateObjectKeyForPath(const std::shared_ptr<IMetadataStorage> & metadata, const std::string & path) | ||
| { | ||
| auto tx = metadata->createTransaction(); | ||
| return tx->generateObjectKeyForPath(path).serialize(); | ||
| } | ||
|
|
||
| std::string createMetadataObjectPath(const std::shared_ptr<IMetadataStorage> & metadata, const std::string & directory) | ||
| { | ||
| auto tx = metadata->createTransaction(); | ||
| auto file_remote_path = tx->generateObjectKeyForPath(fs::path(directory) / "file.txt").serialize(); | ||
| auto object_key_prefix = fs::path(file_remote_path).parent_path().filename(); | ||
| auto common_key_prefix = fs::path(file_remote_path).parent_path().parent_path(); | ||
| return fs::path(common_key_prefix) / "__meta" / object_key_prefix / "prefix.path"; |
Member
Author
There was a problem hiding this comment.
Hack! It is needed to check the remote layout of real blobs in tests.
Michicosun
commented
Nov 20, 2025
| return ObjectStorageKey::createAsAbsolute(fs::path(storage_key_prefix) / remote_info->remote_path / filename); | ||
| } | ||
|
|
||
| std::string FlatDirectoryStructureKeyGenerator::generateForDirectory(const String & path) const |
Member
Author
There was a problem hiding this comment.
API is not consistent with generate. It should also return the remote key starting from the storage_key_prefix, but in this case, all code in plain-rewritable operations should be rewritten.
CheSema
approved these changes
Nov 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Let's move the responsibility of blob IDs generation from object storage to metadata storage. This helps with a more custom implementation of blob tracking lifetime.