codelipenghui commented on code in PR #25304:
URL: https://github.com/apache/pulsar/pull/25304#discussion_r2920544525


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java:
##########
@@ -179,11 +177,8 @@ public void updateTenant(@Suspended final AsyncResponse 
asyncResponse,
                     if (!tenantAdmin.isPresent()) {
                         throw new RestException(Status.NOT_FOUND, "Tenant " + 
tenant + " not found");
                     }
-                    TenantInfo oldTenantAdmin = tenantAdmin.get();
-                    Set<String> newClusters = new 
HashSet<>(newTenantAdmin.getAllowedClusters());
-                    return canUpdateCluster(tenant, 
oldTenantAdmin.getAllowedClusters(), newClusters);
+                    return tenantResources().updateTenantAsync(tenant, old -> 
newTenantAdmin);

Review Comment:
   The `canUpdateCluster()` validation was removed. Previously, updating a 
tenant checked that removed clusters had no active namespaces. Without this 
check, users can remove clusters from a tenant's allowed list while active 
namespaces still exist, potentially orphaning them.
   
   While V1 cluster hierarchy is gone, the safety check itself (preventing 
orphaned namespaces) is still valuable for V2.



-- 
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]

Reply via email to