-
Notifications
You must be signed in to change notification settings - Fork 338
Add location properties from TableMetadata into Table entity internalProps #3226
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
base: main
Are you sure you want to change the base?
Conversation
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.
Looks like a reasonable change to me - I don't see any reason why storing these storage locations is a hefty and/or unreasonable addition to the entities. Happy to switch my opinion if anyone has valid concerns regarding the addition of these locations.
snazy
left a comment
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.
This change raises a question:
Does Polaris actively support setting these properties at all?
Polaris performs a lot of effort to ensure that table/view/namespace locations do not overlap and conflict with each other.
Seeing this change, I realize that neither of these two properties is subject to the same location-overlap or location-validity checks.
I think this change deserves a broader dev mailing list discussion about these two properties in general, mentioning that these properties (and their deprecated, but still evaluated older properties) can break both location validity and overlap checks and assumptions.
dimas-b
left a comment
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.
The diff in this PR LGTM in isolation.
However, making use of the new entity properties can be tricky as Polaris code will have to deal with old entities (on upgrade), which may not have the new properties.
So all in all, having a dev discussion could be useful, indeed.
|
I might be wrong but it seems the locations are taken into account for overlap in polaris/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java Lines 1465 to 1472 in fe57ea1
The problem is that later on in that same method, the internal properties map is computed: polaris/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java Line 1506 in fe57ea1
But the map currently doesn't include polaris/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java Lines 1658 to 1702 in fe57ea1
So, the only way to check those locations is to load the table from the object store. |
Correct – code would have to be lenient to the properties being absent. For request signing at least, the idea would be to load the table if the properties are absent, then update the entity, so that next time the properties are there. |
precisely, the idea is to have location props in sync with what is present in the object store, to avoid redundant call as presently the loadCreds is doing unneccessary call to load from objectstore. when we plan to use it we need to handle backfill, Here is the discuss in Alex on the same Re: opening mail list thread, sure happy to facilitate the discussion over MT on how to handle back fill, me and Alex had some idea which Alex mentioned, on this context but defintely more inputs are certainly welcomed. |
About the change
Presently since not all the location properties are stored in the entity one has to do complete loadTable table even for existing use cases such as credential endpoint which in present scenario since polaris doesn't store the complete metadata copy inside the persistence is kind of expensive.
With this we will have a way to do cred vending, in future (to remote sign) without going to object store.
Note if we take dependency on this we would have to think of backfill but for step 1 it seems reasonable step, would love to know what other folks think
polaris/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java
Lines 616 to 625 in 8ba112e
co-author : @adutra
Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)