nevzheng opened a new pull request, #14258:
URL: https://github.com/apache/gravitino/pull/14258
### What changes were proposed in this pull request?
- **`IcebergViewHookDispatcher#importView` no longer swallows failures.**
`createView` now returns the
real import error, as the table and namespace hooks already do.
- The drop and rename reconcile paths stay best-effort through
`bestEffortReconcileViewEntity`.
### Why are the changes needed?
**A failed view import was reported as "not found".** When the Gravitino
import of a new view failed,
`createView` went on to set an owner on a missing entity. The client got
"not found" for a view that
was created, a retry got AlreadyExists, and the view had no entity and no
owner.
Fix: #14257
### Does this PR introduce _any_ user-facing change?
Yes. An Iceberg REST createView whose Gravitino import fails now returns the
import error instead of
"not found". The backend view still exists, as for tables today.
### How was this patch tested?
- New
`TestIcebergViewHookDispatcher#testCreateViewSurfacesImportFailureInsteadOfOwnerNotFound`,
which
uses an owner dispatcher that fails like `OwnerManager` when the entity is
missing.
- `testCreateViewHandlesImportFailureGracefully` is inverted and renamed
`testCreateViewPropagatesImportFailure`.
- **On `main`:** both fail.
- **With the fix:** both pass, as do the three hook suites,
`TestIcebergAsyncPurge`,
`TestIcebergTableOperationExecutor` and `TestRESTService`.
`./gradlew -PskipITs :iceberg:iceberg-rest-server:test --tests
'*TestIcebergViewHookDispatcher'`
--
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]