mansehajsingh commented on PR #1037: URL: https://github.com/apache/polaris/pull/1037#issuecomment-2738021251
New changes: I've added the table entity to `BasePolarisTableOperations` to make it possible to retrieve an internally stored `IcebergTableLikeEntity` that represents the table along with when we do metadata retrieval. It can be used on the consumer side to pull out the table entity for the metadata being populated if the metadata and entity are refreshed with `doRefresh` (which is called by `current()` after modifications are made on the operations instance and `refresh()` regardless of modifications). It is populated on register, create, and update, so it does not require an extra trip to the metastore when a create or register occurs, which ensures that we are pulling the correct table entity for the version of metadata we have. It can also be used after a call to `current()` to ensure that when we load the metadata we have the same table entity for that version of the metadata as well. This removes the race condition. The extra trip to the metastore on `createTable` and `registerTable` is gone. However, there is still an extra trip on `loadTable` since the time between comparison with the table entity and the full metadata load could introduce an update and we should refetch the table entity, otherwise we have to introduce a new api to fetch the metadata from the location stored in the initial entity (which would be out of date anyway on the next `loadTable`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
