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

Update generate_uri member functions to use the StorageFormat #4530

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

bekadavis9
Copy link
Contributor

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

Copy link

@bekadavis9 bekadavis9 requested a review from KiterLuc November 21, 2023 23:14
Copy link
Contributor

@KiterLuc KiterLuc left a 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(
Copy link
Contributor

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.

Copy link
Contributor Author

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.

tiledb/storage_format/uri/generate_uri.cc Outdated Show resolved Hide resolved
@bekadavis9 bekadavis9 requested a review from KiterLuc November 22, 2023 17:48
@KiterLuc KiterLuc merged commit 61ef498 into dev Nov 23, 2023
53 of 55 checks passed
@KiterLuc KiterLuc deleted the rd/migration-generate_uri branch November 23, 2023 09:49
teo-tsirpanis added a commit that referenced this pull request Feb 19, 2024
Since #4530, the group details folders written have a version field even in V1 groups.
teo-tsirpanis added a commit that referenced this pull request Feb 19, 2024
Since #4530, the group details folders written have a version field even in V1 groups.
teo-tsirpanis added a commit that referenced this pull request Feb 19, 2024
Since #4530, the group details folders written have a version field even in V1 groups.
KiterLuc pushed a commit that referenced this pull request Feb 19, 2024
…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.
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.

2 participants