-
Notifications
You must be signed in to change notification settings - Fork 186
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
Update generate_uri member functions to use the StorageFormat #4530
Conversation
This pull request has been linked to Shortcut Story #37128: Migrate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it's a very simple test, I think we should add one to generate a timestamped name with the new optional parameter not set.
const std::pair<uint64_t, uint64_t>& timestamp_range) { | ||
std::string uuid; | ||
RETURN_NOT_OK(uuid::generate_uuid(&uuid, false)); | ||
void ArraySchema::generate_uri( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we could get rid of this function altogether. It is only called in a few places where a new constructor would remove the need for this. But not necessary to do in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the same thing but the clear()
functions in ArraySchema
and ArraySchemaEvolution
introduce a slight complication to this change, particularly with serialization. It seems it would be better to make both classes C.41 compliant, and remove generate_uri
as a part of that work.
Since #4530, the group details folders written have a version field even in V1 groups.
Since #4530, the group details folders written have a version field even in V1 groups.
Since #4530, the group details folders written have a version field even in V1 groups.
…4744) [SC-41275](https://app.shortcut.com/tiledb-inc/story/41275/fix-v1-groups-written-with-latest-version) When version 2 of the group details format was introduced in #3928 (2.16 and also backported to 2.15), the names of group details V2 files were of the format `__t1_t2_id_version`, and V1 kept using `__t1_t2_id` for compatibility. In #4530 (2.19), V1 files started being written with the new format as well. This confused the group reader, which considered group details files with names of the form `__t1_t2_id_1` as V2, merely because they had a version field in their name. This PR fixes the group reader, making it always consider the version if it is present in the name of details file. The change has been validated by writing to a V1 group and then reading from it. The test group was created locally by Core version 2.14 and was added in `test/inputs/groups` (its size is tiny so it can safely be stored in the repository). --- TYPE: BUG DESC: Support reading V1 group details with explicit version in the name.
Member functions should not generate uuids to create their own timestamped fragment and uri names. Instead, they need only to use the StorageFormat's APIs.
TYPE: IMPROVEMENT
DESC: Use StorageFormat APIs to generate timestamped uris