Alissa Bonas has posted comments on this change.

Change subject: engine: cleanup quota caching
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 318:         long memLimit = quotaVdsGroup.getMemSizeMB();
Line 319:         int cpuLimit = quotaVdsGroup.getVirtualCpu();
Line 320:         if (memLimit == QuotaVdsGroup.UNLIMITED_MEM && cpuLimit == 
QuotaVdsGroup.UNLIMITED_VCPU) { // if both cpu and                              
                                                                     // mem are 
unlimited
Line 321:             // cache
Line 322:             return cacheNewValues(quotaVdsGroup, newMemory, newVcpu, 
true);
Using cacheNewValues for being a return value is IMHO incorrect.
The method iself is about caching values. It should not return boolean - it 
doesn't evaluate anything. Thus it should just be called when it's relevant, 
not be used as return value for other method.
Line 323:         } else if ((newVcpuPercent <= 
quota.getThresholdVdsGroupPercentage() // if cpu and mem usages are under the 
limit
Line 324:                 && newMemoryPercent <= 
quota.getThresholdVdsGroupPercentage())
Line 325:                 || (vcpuToAdd <= 0 && memToAdd <= 0)) {
Line 326:             // cache


--
To view, visit http://gerrit.ovirt.org/11087
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7f9111798330025f68fdbba90bc6272e694e05d3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to