smengcl commented on code in PR #3131:
URL: https://github.com/apache/ozone/pull/3131#discussion_r871750334
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMultiTenantManagerImpl.java:
##########
@@ -204,24 +256,33 @@ public Tenant createTenantAccessInAuthorizer(String
tenantID)
tenant.addTenantAccessPolicy(tenantBucketCreatePolicy);
}
- tenantCache.put(tenantID, new CachedTenantState(tenantID));
- } catch (Exception e) {
+ if (tenantCache.containsKey(tenantId)) {
+ LOG.warn("Cache entry for tenant '{}' somehow already exists, "
+ + "will be overwritten", tenantId); // TODO: throw exception?
+ }
+
+ // New entry in tenant cache
+ tenantCache.put(tenantId, new CachedTenantState(
Review Comment:
Added TODO
--
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]