linyiqun commented on a change in pull request #1677:
URL: https://github.com/apache/ozone/pull/1677#discussion_r545530749



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java
##########
@@ -314,7 +314,9 @@ private BucketEncryptionInfoProto getBeinfo(
    */
   private void checkQuotaInNamespace(OmVolumeArgs omVolumeArgs,
       long allocatedNamespace) throws IOException {
-    if (omVolumeArgs.getQuotaInNamespace() != OzoneConsts.QUOTA_RESET) {
+    // Client has ensured that no negative values other than -1 (clear quota)
+    // will occur when quota is set.
+    if (omVolumeArgs.getQuotaInNamespace() > OzoneConsts.QUOTA_RESET) {

Review comment:
       @captainzmc , here my point is that we should firstly check if the quota 
was enabled by using one variable flag(here I understand is 
OzoneConsts.QUOTA_RESET). Then we check the quota value if it's valid. Is there 
a switch config for the quota now?  If the quota is not enabled, we don't need 
to do the quota check anymore.




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

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