yuqi1129 opened a new pull request, #14716: URL: https://github.com/apache/gravitino/pull/14716
### What changes were proposed in this pull request? Port the table part of #12235 to branch-1.3: `TableOperationDispatcher.dropTable` and `purgeTable` delete the table registration of an external table only when the catalog reports that it dropped the table. Orphaned-schema cleanup still runs. ### Why are the changes needed? A `false` result does not prove that the table is gone. The catalog user may be unable to see it (for example a PostgreSQL schema without USAGE, or an Oracle table whose SELECT privilege was revoked), or it may have been renamed concurrently. Deleting the registration then removed the table's tags and privileges, including DENY privileges, while the table still existed. Main already behaves this way. Fixes #14714 ### Does this PR introduce _any_ user-facing change? Yes. After a table is dropped outside Gravitino, a Gravitino drop of it returns `false` and keeps the stale registration. Before this change, that drop also removed the registration, which some users relied on before recreating a table with the same name. ### How was this patch tested? - `TestTableOperationDispatcher` (39 cases) passes; the drop and purge cases of a table missing from the catalog now also assert that the table entity is kept. - `TestManagedTableOperations`, `TestTableNormalizeDispatcher` and `TestTableEvent` pass. - With the dispatcher change reverted, the 2 updated cases fail. -- 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]
