yuqi1129 commented on issue #13303: URL: https://github.com/apache/gravitino/issues/13303#issuecomment-5811009776
### Remaining items prioritized for 2.0 2.0 ships from `main`, so items that only affect `branch-1.3` are out of scope here. Items are ranked by security/correctness impact, whether they regress earlier fixes in this epic, and cost. | # | Pri | Item | Why this priority | Verified on `main` | |---|-----|------|-------------------|--------------------| | 1 | P0 | Guard the load path when the catalog returns `columns() == null` | `updateColumnsIfNecessary` treats null as "all columns dropped"; since #13307 this soft-deletes every column's tag/policy/owner relations on a single load. Regression from this epic, few-line fix. | Yes | | 2 | P0 | Stale table registration inherited when a table with the same name is recreated | `internalCreateTable` calls `store.put(entity, true)`; the MySQL/H2 upsert keeps the old `table_id`, so the old table's tags, policies and granted privileges carry over to the new table (privilege leak). PostgreSQL fails the insert and the table becomes unloadable. | Yes | | 3 | P0 | Model/tag/policy rename or delete doesn't call `notifyEntityNameIdMappingChange` | Only `AuthorizationUtils` and `FunctionHookDispatcher` notify. A stale name→id entry lets authorization evaluate a recreated object against the old id. Small fix. | Yes | | 4 | P0 | Close the load/alter race: `alterTable` takes a WRITE tree lock on the table; the load path no longer computes the column diff before the lock | A load or alter interleaving with an alter can undo a column rename and drop its tags. Do both items in one PR, with a stale-catalog-snapshot ordering test. | Yes (acknowledged in `updateColumnsIfNecessaryWhenLoad`) | | 5 | P1 | Metalake drop: tag relations / role securable objects not cleaned (ordering), `softDeletePolicyMetadataObjectRelsByMetalakeId` never called, non-cascade drop leaves policies and policy versions live | Tags and roles are soft-deleted before the relation cleanup, whose SQL requires a live parent. Low user visibility (the metalake is gone) but a cheap fix. | Yes | | 6 | P1 | Case-insensitive catalogs reporting case-sensitive column names (e.g. MySQL JDBC): `renameColumn` with a case-mismatched old name falls back to drop + add | User-visible tag loss, narrow fix. | Not yet | | 7 | P1 | Managed and Lance tables treat nested-field changes (`fieldName.length > 1`) as top-level column names | The Lance dataset changes but the Gravitino metadata update fails, leaving the two out of sync. | Not yet | | 8 | P1 | `put(overwrite)` doesn't invalidate the entity cache entry for the old name after an import renames the row | Stale cache reads when the entity cache is enabled. | Not yet | | 9 | P2 | Deleting a job template or job doesn't clean owner relations or securable objects | `OrphanedMetadataObjectRelationService` on `main` covers `JOB` and `JOB_TEMPLATE`, so leaked rows are eventually collected. | Yes | | 10 | P2 | Out-of-band rename on catalogs that don't persist the Gravitino id leaves an undroppable old registration | Needs a design change; propose documenting it as a known issue for 2.0. | — | | 11 | — | Tests that assert relation rows after drop and rename | Not a separate task: ship with each fix above. | — | Out of scope for 2.0 (`branch-1.3` only): - "Deleting a policy doesn't clean its object relations, owner or privileges" is fixed by #13321 (merged to `branch-1.3`, covers both tag and policy); the checkbox can be ticked. - "Non-cascade schema drop doesn't check for views or functions before dropping" (1.3). -- 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]
