deniskuzZ commented on code in PR #5995:
URL: https://github.com/apache/hive/pull/5995#discussion_r2322220125


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -257,7 +260,13 @@ public Class<? extends AbstractSerDe> getSerDeClass() {
   public HiveMetaHook getMetaHook() {
     // Make sure to always return a new instance here, as HiveIcebergMetaHook 
might hold state relevant for the
     // operation.
-    return new HiveIcebergMetaHook(conf);
+    String catalogType = CatalogUtils.getCatalogType(conf);
+    if (StringUtils.isEmpty(catalogType) || 
CatalogUtil.ICEBERG_CATALOG_TYPE_HIVE.equals(catalogType)) {
+      return new HiveIcebergMetaHook(conf);
+    } else {
+      conf.set(ConfigProperties.LOCK_HIVE_ENABLED, "false");

Review Comment:
   probably not part of this PR, however, I am not sure if we are not breaking 
transaction isolation for non-native catalogs. 
   
   `HiveTableOperations.doCommit()` is doing an atomic METADATA_LOCATION_PROP 
check & update in HMS backend DB. If location was changed by concurrent 
transaction - we rollback.
   How is that supposed to work in case of Rest or Hadoop catalogs?



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to