Tarun-kishore commented on code in PR #20235:
URL: https://github.com/apache/pinot/pull/20235#discussion_r4546375505
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java:
##########
@@ -691,13 +788,30 @@ public SuccessResponse deleteTenant(
break;
}
if (res.isSuccessful()) {
+ deleteTenantQuotaConfigIfTenantGone(tenantName);
return new SuccessResponse("Successfully deleted tenant " + tenantName);
}
_controllerMetrics.addMeteredGlobalValue(ControllerMeter.CONTROLLER_TABLE_TENANT_DELETE_ERROR,
1L);
throw new ControllerApplicationException(LOGGER, "Error deleting tenant.
Reason: " + res.getMessage(),
Response.Status.INTERNAL_SERVER_ERROR);
}
+ /// Deletes the quota defaults of a tenant once it no longer exists as
either a server or a broker tenant, so that
+ /// they don't silently apply to a tenant later re-created with the same
name.
+ private void deleteTenantQuotaConfigIfTenantGone(String tenantName) {
Review Comment:
defaults are removed only on DELETE /tenants/{name}, and kept if the tenant
disappears another way.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]