yuqi1129 opened a new pull request, #14787: URL: https://github.com/apache/gravitino/pull/14787
### What changes were proposed in this pull request? - `OwnerManager.setOwner` throws `NoSuchMetadataObjectException` when the store reports a missing entity and the owner still exists. If the owner is missing too, the existing `NotFoundException` is kept. - `TableHookDispatcher.createTable` catches only that exception, logs a warning, and returns the created table. No interface changes and no SQL changes. ### Why are the changes needed? With authorization enabled, the owner is set after the table is created. A concurrent drop can remove the table between the two steps. The create has succeeded, but the client gets a 404. Fixes #14420 ### Does this PR introduce _any_ user-facing change? A create that races a drop now returns 200 instead of 404. `setOwner` on an object dropped during the call still returns 404, with the more specific `NoSuchMetadataObjectException` type. Known limits, unchanged by this PR: - A late owner step can still overwrite the owner of a new table with the same name. Fixing this needs a table ID check. - Other create paths have the same race. See #14786. - Two soft deletes of one name in the same millisecond can still make a drop return 500. ### How was this patch tested? - Added unit tests in `TestOwnerManager` and `TestTableHookDispatcher`. - Real server with authorization on, H2 store, Iceberg memory backend, 8 create and 8 drop clients on one name. Before: 313 of 600 creates returned 404. After: 0 of 600. - After 60 more race rounds, the table was always live and had an owner. -- 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]
