[ 
https://issues.apache.org/jira/browse/HIVE-29016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985065#comment-17985065
 ] 

Henri Biestro edited comment on HIVE-29016 at 6/21/25 6:58 AM:
---------------------------------------------------------------

[~okumin] I agree that the proper order is 'make it run then make it fast'.
In the same spirit, evolution is preferable to revolution ; we can mitigate 
both goals by letting the default property value disable the cache *and* 
improve the cache handling so we can readily verify it.
(Updated #5882 accordingly)


was (Author: henrib):
[~okumin] I agree that the proper order is 'make it run then make it fast'.
In the same spirit, evolution is preferable to revolution ; we can mitigate 
both goals by letting the default property value disable the cache *and* 
improve the cache handling so we can readily verify it.

> Disable caching on the Iceberg REST Catalog
> -------------------------------------------
>
>                 Key: HIVE-29016
>                 URL: https://issues.apache.org/jira/browse/HIVE-29016
>             Project: Hive
>          Issue Type: Improvement
>          Components: Iceberg integration, Standalone Metastore
>            Reporter: Shohei Okumiya
>            Priority: Major
>              Labels: hive-4.1.0-must
>
> The current implementation caches entries based on the property `
> metastore.iceberg.catalog.cache.expiry`.
> [https://github.com/apache/hive/blob/4193a6db6243bfd8a5a2a3d142bef5acdb02e389/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCachingCatalog.java]
>  
> I observed that this made CREATE TABLE from Trino non-functional. With 
> CachingCatalog, [a transaction is created as a 
> CommitCallbackTransaction|https://github.com/apache/iceberg/blob/62d9ff5d043a5571efe020b9177998ae763a41a0/core/src/main/java/org/apache/iceberg/CachingCatalog.java#L286-L303].
>  However, CatalogHandler can't process the class, as 
> CommitCallbackTransaction is not a sub-class of BaseTransaction. Our 
> implementation is probably wrong.
>  * 
> [https://github.com/apache/hive/blob/4193a6db6243bfd8a5a2a3d142bef5acdb02e389/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java#L420]
>  * 
> [https://github.com/apache/iceberg/blob/62d9ff5d043a5571efe020b9177998ae763a41a0/core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java#L350-L356]
>  
> Essentially, I believe that caching Iceberg objects is a form of premature 
> optimization. What if a user accesses HMS via Iceberg REST API and another 
> accesses the same table via Thrift API? What if Hive Metastore is configured 
> with HA? It is likely causing a issue.
> In this ticket, I propse to remove the caching mechanism once.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to