henrib commented on issue #13800: URL: https://github.com/apache/iceberg/issues/13800#issuecomment-3204850821
The use case for the PR is the HiveCatalog used as the delegate of the Iceberg REST Catalog server embedded within HMS; if there are 2 multiple threads accessing it, they are doing so through the exposed REST API and only through loadTable(). And API calls that modify tables invalidate their entry in the cache. There is no potential case of concurrent refresh() in this configuration and the Table objects retrieved through loadTable() are anyway serialized as response; from the client perspective, there is no difference between a cached and a non-cached table. The issue you describe would indeed occur if someone mistakingly configured a cache in a shared instance of HiveCatalog. Since this PR intent is really only caching within the confines of the REST server, exposing the method getMetadataLocation() seems a less disruptive way of ensuring we can implement a cache that avoids serving stale objects. Cheers, Henri -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
