yuqi1129 opened a new pull request, #14557: URL: https://github.com/apache/gravitino/pull/14557
### What changes were proposed in this pull request? - Initialize post-create table ownership using the ID returned by creation, rather than assigning ownership by name alone. - Fence the table identity and check for an existing owner under database row locks. Skip initialization when the table was deleted, replaced, renamed, or already assigned an owner, and return the original creation snapshot. - Check the new core ownership capability before creating a table; unsupported custom dispatchers/backends fail before external or metadata writes. Preserve successful-assignment cache invalidation and notifications. ### Why are the changes needed? A concurrent drop can remove a newly created table before its owner callback runs, causing an already completed create to report a misleading owner-lookup 404. A delayed callback can also overwrite the owner of a same-name replacement. Fixes #14420 ### Does this PR introduce _any_ user-facing change? Post-create ownership skips no longer fail an otherwise completed table creation or overwrite an existing stored owner. Principal and storage failures remain visible. The identity guarantee applies to Gravitino's stored owner relation. Authorization plugin notifications retain their existing post-commit, name-based behavior and failure propagation. Other entity create hooks are unchanged. Custom core ownership dispatchers/backends must opt in to the new capability for authorized table creation; no SQL/schema migration is needed. ### How was this patch tested? - 42 filtered core unit tests covering ownership dispatch, cache invalidation, hook and event behavior. - 19 owner-assignment cases on each of H2, MySQL and PostgreSQL, including actual database blocker/waiter checks and a full hook/storage same-name replacement scenario. - All 99 tests passed, with no skips. No full core suite was run. - Two key regressions failed with the old name-only assignment restored; both and the full hook/replacement case passed after restoring the fix. - Spotless, `git diff --check` and fresh-context review passed. -- 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]
