GutoVeronezi commented on code in PR #6587:
URL: https://github.com/apache/cloudstack/pull/6587#discussion_r936657651
##########
server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java:
##########
@@ -1112,22 +1114,21 @@ public ResourceCountCheckTask() {
protected void runInContext() {
s_logger.info("Started resource counters recalculation periodic
task.");
List<DomainVO> domains =
_domainDao.findImmediateChildrenForParent(Domain.ROOT_DOMAIN);
+ List<AccountVO> accounts =
_accountDao.findActiveAccountsForDomain(Domain.ROOT_DOMAIN);
- // recalculateDomainResourceCount will take care of re-calculation
of resource counts for sub-domains
- // and accounts of the sub-domains also. so just loop through
immediate children of root domain
- for (Domain domain : domains) {
- for (ResourceType type : ResourceCount.ResourceType.values()) {
- if (type.supportsOwner(ResourceOwnerType.Domain)) {
+ for (ResourceType type : ResourceCount.ResourceType.values()) {
+ if (type.supportsOwner(ResourceOwnerType.Domain)) {
+ // recalculateDomainResourceCount will take care of
re-calculation of resource counts for root and sub-domains
+ // and accounts of the sub-domains also. so just loop
through immediate children of root domain
Review Comment:
This comment could be the javadoc of the method.
##########
engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeObject.java:
##########
@@ -678,6 +682,32 @@ protected void updateVolumeInfo(VolumeObjectTO newVolume,
VolumeVO volumeVo, boo
s_logger.debug(String.format("Updated %s from %s to %s ",
volumeVo.getVolumeDescription(), previousValues, newValues));
}
+ protected void updateResourceCount(VolumeObjectTO newVolume, VolumeVO
volumeVo) {
Review Comment:
@sureshanaparti, we should rename `volumeVo` to avoid misleading with the
class property `volumeVO`.
--
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]