You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/11/18 09:35:48 UTC

[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5687: db: Avoid db locks if account resource limit is -1

weizhouapache commented on a change in pull request #5687:
URL: https://github.com/apache/cloudstack/pull/5687#discussion_r752059171



##########
File path: server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
##########
@@ -521,13 +520,21 @@ public void checkResourceLimit(final Account account, final ResourceType type, l
         }
 
         final Project projectFinal = project;
+
+        // Check account limits. If it's unlimited then don't lock the db rows
+        long accountResourceLimit = findCorrectResourceLimitForAccount(account, type);
+        if (Resource.RESOURCE_UNLIMITED == accountResourceLimit) {

Review comment:
       @ravening 
   if account resource limit is -1, it does not mean the account can use resources without limitation. the domain resource limit should be checked as well.




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org