sachinnn99 opened a new pull request, #10958:
URL: https://github.com/apache/gravitino/pull/10958

   ### What changes were proposed in this pull request?
   
   Wrap `setViewOwner()` in a try-catch in 
`IcebergViewHookDispatcher.createView()` so that ownership-setting failures do 
not fail the entire create view operation.
   
   ### Why are the changes needed?
   
   When creating a view via Trino against a remote Iceberg REST Catalog, the 
view is successfully created in the underlying Iceberg catalog. However, if the 
post-creation `setViewOwner()` call fails (e.g., because the view entity was 
not yet imported into the EntityStore), it throws 
`NoSuchMetadataObjectException` which propagates as a 500 error back to Trino — 
killing the entire create view response.
   
   The `importView()` call on the line above is already best-effort (wrapped in 
try-catch). The `setViewOwner()` call should follow the same pattern: 
post-creation hooks should not break the Iceberg REST response when the view 
was already created successfully.
   
   Fix: #10925
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API changes. View creation via Iceberg REST will no longer fail when 
ownership setting encounters an error.
   
   ### How was this patch tested?
   
   Existing unit tests in `iceberg-rest-server` module pass:
   ```
   ./gradlew :iceberg:iceberg-rest-server:test -PskipITs
   ```


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