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 to use post_array_schema_from_rest. #5181

Draft
wants to merge 36 commits into
base: dev
Choose a base branch
from

Conversation

shaunrd0
Copy link
Contributor

@shaunrd0 shaunrd0 commented Jul 11, 2024

This updates internal get_array_schema_from_rest calls to post_array_schema_from_rest added in #4399. This also fixes array schema evolution time traveling issues reported in SC-49827 caused by not using timestamps to open the array for tiledb:// URIs.

[sc-32991]


TYPE: NO_HISTORY
DESC: Update to use post_array_schema_from_rest.

davisp and others added 17 commits September 11, 2023 13:58
This adds all of the Capnp messages, serialization code, rest client
functions, and server side request processing for handling the new load
array schema handler.

Notably, this does not update `tiledb_array_schema_load` to use these
new functions because that cannot happen until after TileDb-Cloud-REST
is deployed with a libtiledb that contains this commit.
This change enables the REST POST endpoint for loading array schemas
from the REST server as well as enables the
load_schema_with_enumerations behavior both for rest and local storage.
Originally I just slapped a tiledb_array_schema_load_with_enumerations
and a hidden boolean on the load. This approach will prevent us from
having to deprecate APIs in the future if we ever need to change the
list of options for loading array schema.
+ Fix bug from using incorrect timestamps.
@shaunrd0 shaunrd0 requested review from davisp, ypatia and KiterLuc July 11, 2024 19:03
@shaunrd0 shaunrd0 marked this pull request as draft July 11, 2024 19:23
Copy link
Member

@ypatia ypatia left a comment

Choose a reason for hiding this comment

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

Great job!!! A few comments to address.

tiledb/sm/serialization/array_schema.cc Outdated Show resolved Hide resolved
tiledb/sm/c_api/tiledb_experimental.h Outdated Show resolved Hide resolved
tiledb/sm/c_api/tiledb.cc Outdated Show resolved Hide resolved
tiledb/sm/c_api/tiledb.cc Outdated Show resolved Hide resolved
tiledb/sm/c_api/tiledb.cc Outdated Show resolved Hide resolved
tiledb/sm/array/array.cc Show resolved Hide resolved
test/src/unit-rest-array-schema-load.cc Outdated Show resolved Hide resolved
test/src/unit-rest-array-schema-load.cc Outdated Show resolved Hide resolved
test/src/unit-rest-array-schema-load.cc Show resolved Hide resolved
@shaunrd0 shaunrd0 requested a review from ypatia July 19, 2024 17:36
.gitlab-ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@ypatia ypatia left a comment

Choose a reason for hiding this comment

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

🚀
Can we open the PR now?

@shaunrd0 shaunrd0 marked this pull request as ready for review July 22, 2024 16:27
@shaunrd0 shaunrd0 requested a review from a team as a code owner July 22, 2024 16:27
@shaunrd0
Copy link
Contributor Author

🚀 Can we open the PR now?

Yep marked ready for review, looking at CI failures now

tiledb/sm/cpp_api/config.h Outdated Show resolved Hide resolved
@shaunrd0 shaunrd0 force-pushed the pd/sc-32991/use-handle-load-array-request branch from e008f81 to 7f7fa1d Compare July 23, 2024 16:34
@shaunrd0 shaunrd0 force-pushed the pd/sc-32991/use-handle-load-array-request branch from 7f7fa1d to aa494ce Compare July 23, 2024 17:27
@ypatia ypatia marked this pull request as draft July 24, 2024 08:51
@ypatia
Copy link
Member

ypatia commented Jul 24, 2024

Moving to draft to not accidentally merge before fixing the TILEDB_CLOUD_REST_REF branch.

Copy link
Contributor

@nickvigilante nickvigilante left a comment

Choose a reason for hiding this comment

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

Approved tiledb/api/c_api/config/config_api_external.h and tiledb/sm/cpp_api/config.h only. Docs PR in progress.

shaunrd0 added 3 commits July 25, 2024 09:35
+ Fixes a test failure in REST where only the latest schema would have
  enumerations loaded in the response.
@ypatia
Copy link
Member

ypatia commented Aug 8, 2024

I think this PR in its current format creates a chicken and egg situation. Long story short we can't be introducing CAPNP changes in the same PR as we are enabling a REST request that will need to be handled server-side by deserializing that changed CAPNP model. Not at all confusing 😅 As a rule of thumb CAPNP changes need to happen in a previous release than the one that sends a request to the route that will be using that CAPNP.
My suggestion is to break this PR in 2:

  • One with the CAPNP changes & anything related to just this (ser/deser functions etc) that we'll merge asap and backport to 2.25.X in hope of a maintenance release that will get that in soon.
  • One with the C-API logic and is_tiledb() - rest_client changes that enables hitting the route on the REST Server.

Hope it makes sense and sorry I didn't catch that earlier :(

KiterLuc pushed a commit that referenced this pull request Aug 27, 2024
…5237)

This factors out serialization and API changes in #5181 that are
required for the HandleGetArraySchema route. These changes will need to
be available on REST before we can enable the new route for loading the
array schema.

There is a quick summary of the changes required in
[SC-52877](https://app.shortcut.com/tiledb-inc/story/52877/core-serialization-changes-for-loadarrayschema-models).

---
TYPE: IMPROVEMENT
DESC: Add serialization and API changes for post_array_schema_from_rest.
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.

4 participants