smengcl commented on a change in pull request #3177:
URL: https://github.com/apache/ozone/pull/3177#discussion_r840958800



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tenant/OMTenantCreateRequest.java
##########
@@ -292,27 +291,27 @@ public OMClientResponse validateAndUpdateCache(
       // Create tenant
       // Add to tenantStateTable. Redundant assignment for clarity
       final String bucketNamespaceName = volumeName;
-      final List<String> policyNamesList = new ArrayList<>();
       // Populate policy ID list
-      // TODO: Check if both policies are actually used. Remove if not
-      policyNamesList.add(tenantDefaultPolicies);
-      final String bucketPolicyGroupName =
-          tenantId + OzoneConsts.DEFAULT_TENANT_BUCKET_POLICY_SUFFIX;
+      final String bucketNamespacePolicyName =
+          OMMultiTenantManager.getDefaultBucketNamespacePolicyName(tenantId);
       final String bucketPolicyName =
-          bucketPolicyGroupName + 
OzoneConsts.DEFAULT_TENANT_POLICY_NAME_SUFFIX;
-      policyNamesList.add(bucketPolicyName);
-
-      final OmDBTenantState omDBTenantInfo = new OmDBTenantState(
-          tenantId, bucketNamespaceName, policyNamesList);
+          OMMultiTenantManager.getDefaultBucketNamespacePolicyName(tenantId);

Review comment:
       Good catch




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

Reply via email to