You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "dimas-b (via GitHub)" <gi...@apache.org> on 2025/10/01 19:53:10 UTC
Re: [PR] [Catalog Federation] Ignore JIT entities when deleting federated catalogs, add integration test for namespace/table-level RBAC [polaris]
dimas-b commented on code in PR #2690:
URL: https://github.com/apache/polaris/pull/2690#discussion_r2395720114
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/AtomicOperationMetaStoreManager.java:
##########
@@ -1204,16 +1205,23 @@ private void revokeGrantRecord(
// the id of the catalog
long catalogId = refreshEntityToDrop.getId();
- // if not all namespaces are dropped, we cannot drop this catalog
- // TODO: Come up with atomic solution to blocking dropping of container entities that
- // have children; one option is reference-counting if all child creation/drop operations
- // become two-entity bulk conditional updates that also update the refcount on the parent
- // if not changed concurrently (else retry). In the meantime, there's a window of time
- // where dropping a namespace or container is effectively "recursive" in deleting its
- // children as well if those child entities were created within the short window of
- // the race condition.
- if (ms.hasChildren(callCtx, PolarisEntityType.NAMESPACE, catalogId, catalogId)) {
- return new DropEntityResult(BaseResult.ReturnStatus.NAMESPACE_NOT_EMPTY, null);
+ CatalogEntity catalogEntityToDrop = CatalogEntity.of(refreshEntityToDrop);
+ // For passthrough facade catalogs, all catalog level entities, except catalog roles, are
+ // passthrough entities that are not source-of-truth
+ // TODO: Temporarily allow dropping a catalog with passthrough entities remaining, in the long
+ // term we need to cleanup them up to avoid accumulation in the metastore
Review Comment:
This can cause data accumulation in deployments where (naive) users use federated catalogs without being aware of Polaris internals. In the long run it can become a burden for the project to address the cleanup of those dangling entries.
I propose to add a feature flag for enabling the non-cascading delete (with default being "not allowed"). This way users at least become aware of the implications. WDYT?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org