Skip to content

Update array create to pass the storage path in payload #5565

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

Draft
wants to merge 1 commit into
base: shaunreed/core-251-update-endpoint-for-post_group_create_to_rest
Choose a base branch
from

Conversation

ypatia
Copy link
Member

@ypatia ypatia commented Jun 27, 2025

In the new Server the storage path should not be passed in the request endpoint URL, so we need to specify it in the request payload. In Group create case this was already implemented, but for arrays it was not.
This PR attempts to fix it by setting the storage path in an existing capnp field, the uri of the ArraySchema, only for array create. We need to implement the server side changes to see if that can work.


TYPE: IMPROVEMENT
DESC: Update array create to pass the storage path in payload

@ypatia ypatia requested a review from shaunrd0 June 30, 2025 08:47
RETURN_NOT_OK(serialization::array_schema_serialize(
array_schema, serialization_type_, buff, false));
array_schema, serialization_type_, buff, false, rest_uri.asset_storage));
Copy link
Member

Choose a reason for hiding this comment

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

It wasn't part of your change, but wondering why client_side is explicitly set to false here? Is there any reason we would not want to set the array schema URI server side? Since this is false the field is unset when it reaches TileDB-Server.

If there's no reason to avoid setting this field server side, we may just be able to remove the if (client_side) check that sets the URI field.

@@ -1190,7 +1196,8 @@ Status array_schema_serialize(
const ArraySchema& array_schema,
SerializationType serialize_type,
SerializationBuffer& serialized_buffer,
const bool client_side) {
const bool client_side,
std::optional<std::string> storage_uri) {
Copy link
Member

Choose a reason for hiding this comment

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

I can't comment in unchanged code, but we need to pass storage_uri to array_schema_to_capnp on 1206 below

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