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

   ### What changes were proposed in this pull request?
   
   Build Iceberg load-view responses from a checked metadata snapshot. If a 
native rename removes the old view between the existence check and metadata 
read, throw `NoSuchViewException` with the identifier instead of passing null 
metadata to the response builder.
   
   ### Why are the changes needed?
   
   Iceberg 1.11 creates a fresh operations instance after checking view 
existence. A native rename in between can therefore turn a missing view into 
`NullPointerException: metadata` rather than the normal not-found response.
   
   Fix: #13895
   
   ### Does this PR introduce _any_ user-facing change?
   
   A view that disappears during loading produces a normal not-found error 
instead of an internal metadata NPE. Successful responses keep the same 
metadata and location fields.
   
   ### How was this patch tested?
   
   - A real JDBC/SQLite catalog deterministically renames a view between the 
two operations instances; the old name reports not-found and the new name 
remains readable.
   - All non-Docker tests passed on Apache Gravitino `main` (iceberg-common: 
80, catalog-lakehouse-iceberg: 115, iceberg-rest-server: 466).
   - Spotless checks passed.
   - Reverting the fix reproduces the original metadata NPE in the regression; 
restoring it passes.
   - Command: `./gradlew :iceberg:iceberg-common:spotlessCheck 
:iceberg:iceberg-common:test :catalogs:catalog-lakehouse-iceberg:test 
:iceberg:iceberg-rest-server:test -PskipITs -PskipDockerTests=true` with 
`SKIP_DOCKER_TESTS=true`.
   


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