Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Fragment list consolidation for tiledb cloud arrays#5059

Open
ypatia wants to merge6 commits intomain
base:main
Choose a base branch
Loading
fromyt/sc-48774/fragment_list_consolidation

Conversation

ypatia
Copy link
Member

@ypatiaypatia commentedJun 7, 2024
edited
Loading

[sc-48774]
This PR implements the needed changes on Core side for supporting fragment list cloud consolidation fortiledb:// arrays.
In order for this feature to work end-to-end changes are also needed on the REST server side to deserialize the capnp request and call the right method (consolidate_fragments) for actually doing the consolidation.


TYPE: FEATURE
DESC: Fragment list consolidation for tiledb cloud arrays

@ypatiaypatiaforce-pushed theyt/sc-48774/fragment_list_consolidation branch from677f049 tof776d91CompareJune 7, 2024 13:27
throw_if_not_ok(fragment_consolidator->consolidate_fragments(
array_name, encryption_type, encryption_key, key_length, fragment_uris));
// Consolidate
auto fragment_consolidator =
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

removeddynamic_cast that should be avoided when possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not do that now. If we're going to do this, let's change all the places that use Consolidator::create for something better and consistent.

Copy link
MemberAuthor

@ypatiaypatiaSep 4, 2024
edited
Loading

Choose a reason for hiding this comment

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

Why shouldn't we do that immediate improvement? This is the only occurrence of adynamic_cast in consolidation code, and the reason is thatconsolidate_fragments is a method ofFragmentConsolidator and not of its parent classConsolidator.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

After discussing offline, I am reverting this change, although I think it's improving the current situation, to get this long standing PR finally unblocked and merged.

// Check if array exists
ObjectType obj_type;
throw_if_not_ok(
object_type(storage_manager->resources(), array_uri, &obj_type));
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

moved this in theelse case so that it's not executed for remote arrays and cause 2 extra REST requests (is_group andis_array)

@ypatiaypatiaforce-pushed theyt/sc-48774/fragment_list_consolidation branch fromf776d91 to124ce98CompareJune 7, 2024 13:34
@ypatiaypatia closed thisJun 7, 2024
@ypatiaypatia reopened thisJun 7, 2024
@ypatiaypatiaforce-pushed theyt/sc-48774/fragment_list_consolidation branch from124ce98 to4e092eaCompareJune 10, 2024 13:28
@ypatiaypatiaforce-pushed theyt/sc-48774/fragment_list_consolidation branch from6b273c4 to155a23cCompareJune 21, 2024 08:43
array_consolidation_request_builder->initFragments(
fragment_uris->size());
for (size_t i = 0; i < fragment_uris->size(); i++) {
fragment_list_builder.set(i, (*fragment_uris)[i]);
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

those need to become relative to cross the wire, otherwise it's a security concern. Useserialize_array_uri_to_relative anddeserialize_array_uri_to_absolute utility functions

@ypatiaypatiaforce-pushed theyt/sc-48774/fragment_list_consolidation branch from155a23c to3ab70bdCompareJuly 24, 2024 07:58
@ypatiaypatia marked this pull request as ready for reviewAugust 5, 2024 12:33
@ypatia
Copy link
MemberAuthor

ypatia commentedAug 5, 2024
edited
Loading

@KiterLuc we should discuss before merging this in case we first need to address this one first:https://app.shortcut.com/tiledb-inc/story/52302/increase-number-of-max-fragments-in-tiledb-fragment-list-consolidation

@@ -113,7 +118,8 @@ array_consolidation_request_from_capnp(
auto fragment_reader = array_consolidation_request_reader.getFragments();
fragment_uris.reserve(fragment_reader.size());
for (const auto& fragment_uri : fragment_reader) {
fragment_uris.emplace_back(fragment_uri);
fragment_uris.emplace_back(deserialize_array_uri_to_absolute(
Copy link
Contributor

Choose a reason for hiding this comment

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

REST CI is failing because the path normalization here is not happening on REST since go-capnp handles deserializing the request from generated source code. So we are serializing absolute URIs as relative URIs from core client-side, but REST does not calldeserialize_consolidation_request and the switch back to absolute never happens.

We could add atiledb_handle_array_consolidation_request much liketiledb_handle_load_array_schema_request that would just calldeserialize_consolidation_request, but we'll need a TileDB-Go binding and subsequent REST PR to update the route to use it.

Another option without the handler and Go binding is to handle a second type of relative URIs inFragmentConsolidator::consolidate_fragments that is relative to thearray_uri/ directory. The relative URIs handled inconsolidate_fragments linked above is currently relative to thearray_uri/__fragments directory.

Copy link
MemberAuthor

@ypatiaypatiaAug 6, 2024
edited
Loading

Choose a reason for hiding this comment

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

How about reconstructing the absolute URIs inHandleConsolidateArrayRequest on REST Server side by prepeding the array URI toarrayConsolidationRequest.Fragments before callingConsolidateFragments ? Would that be possible? Looks like the least "invasive" solution.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Opened this to track, we discussed and this is a feasible REST-Server side solution:https://app.shortcut.com/tiledb-inc/story/52679/fix-fragment-list-consolidation-handler-to-convert-relative-uris-to-absolute

Let's get this reviewed in the meantime when you have some spare time.

Copy link
Contributor

@shaunrd0shaunrd0Aug 19, 2024
edited
Loading

Choose a reason for hiding this comment

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

This is done and I merged this branch to fix conflicts. I'll watch for CI failures but LGTM 👍

@ypatiaypatiaforce-pushed theyt/sc-48774/fragment_list_consolidation branch froma4c8c71 to65c1812CompareSeptember 4, 2024 11:47
@ypatia
Copy link
MemberAuthor

@KiterLuc this is now ready for merging.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@shaunrd0shaunrd0shaunrd0 approved these changes

@KiterLucKiterLucAwaiting requested review from KiterLuc

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ypatia@shaunrd0@KiterLuc

[8]ページ先頭

©2009-2025 Movatter.jp