jackjlli commented on a change in pull request #4431: Misc fix for controller 
tests
URL: https://github.com/apache/incubator-pinot/pull/4431#discussion_r303166704
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/validation/StorageQuotaChecker.java
 ##########
 @@ -105,14 +105,16 @@ public QuotaCheckerResponse 
isSegmentStorageWithinQuota(@Nonnull File segmentFil
 
     if (quotaConfig == null || 
Strings.isNullOrEmpty(quotaConfig.getStorage())) {
       // no quota configuration...so ignore for backwards compatibility
-      LOGGER.warn("Quota configuration not set for table: {}", 
tableNameWithType);
-      return success("Quota configuration not set for table: " + 
tableNameWithType);
+      LOGGER.info("Storage quota is not configured for table: {}, skipping the 
check", tableNameWithType);
+      return success("Storage quota is not configured for table: " + 
tableNameWithType);
     }
 
     long allowedStorageBytes = numReplicas * quotaConfig.storageSizeBytes();
-    if (allowedStorageBytes < 0) {
-      LOGGER.warn("Storage quota is not configured for table: {}", 
tableNameWithType);
-      return success("Storage quota is not configured for table: " + 
tableNameWithType);
+    if (allowedStorageBytes <= 0) {
+      LOGGER.warn("Invalid storage quota: {} for table: {}, skipping the 
check", quotaConfig.getStorage(),
 
 Review comment:
   Can we reuse the same String for logging and throwing exception? Same 
question on Line 108.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to