Allon Mureinik has posted comments on this change.

Change subject: core: Quota refactor - QuotaManager
......................................................................


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

(2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 331:         }
Line 332:     }
Line 333: 
Line 334:     private boolean 
validateAndSetStorageQuotaHelper(QuotaConsumptionParametersWrapper parameters) {
Line 335:         lock.readLock().lock();
you're modifying stuff - shouldn't there be a writeLock there somewhere?
Line 336:         try {
Line 337:             synchronized 
(storagePoolQuotaMap.get(parameters.getAuditLogable().getStoragePool().getId()))
 {
Line 338:                 if 
(storagePoolQuotaMap.get(parameters.getAuditLogable().getStoragePool().getId()) 
== null) {
Line 339:                     return false;


Line 346: 
Line 347:                 generateDesiredStorageSizeQuotaMap(parameters, 
desiredStorageSizeQuotaMap);
Line 348: 
Line 349:                 for (Guid quotaId : 
desiredStorageSizeQuotaMap.keySet()) {
Line 350:                     Quota quota = quotaMap.get(quotaId);
just iterate over the entrySet
Line 351:                     if (quota.getGlobalQuotaStorage() != null) {
Line 352:                         if 
(checkConsumptionForGlobalStorageQuota(parameters,
Line 353:                                 desiredStorageSizeQuotaMap,
Line 354:                                 newUsedGlobalStorageSize,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb100467a55b26e4219d1a2562da86b81ffdc032
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <oma...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: ofri masad <oma...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to