mehakmeet commented on code in PR #10834:
URL: https://github.com/apache/gravitino/pull/10834#discussion_r3137369329


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergNamespaceHookDispatcher.java:
##########
@@ -59,13 +64,20 @@ public CreateNamespaceResponse createNamespace(
       IcebergRequestContext context, CreateNamespaceRequest createRequest) {
     CreateNamespaceResponse response = dispatcher.createNamespace(context, 
createRequest);
 
-    importSchema(context.catalogName(), createRequest.namespace());
-    IcebergOwnershipUtils.setSchemaOwner(
-        metalake,
-        context.catalogName(),
-        createRequest.namespace(),
-        context.userName(),
-        GravitinoEnv.getInstance().ownerDispatcher());
+    try {
+      importSchema(context.catalogName(), createRequest.namespace());
+      IcebergOwnershipUtils.setSchemaOwner(
+          metalake,

Review Comment:
   Yea, I was initially thinking that it's required for the set owner call only 
so wrapped them in one try catch, but probably better to propagate this 
exception as the entity won't be existing in Gravitino if this fails.



-- 
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]

Reply via email to