Gilad Chaplik has posted comments on this change.

Change subject: core: Fast update quota cache
......................................................................


Patch Set 8: (2 inline comments)

....................................................
File backend/manager/dbscripts/create_functions.sql
Line 620:         quota_limitation.quota_id as quota_id,
Line 621:         quota_limitation.vds_group_id as vds_group_id,
Line 622:         vds_groups.name AS vds_group_name,
Line 623:         quota_limitation.virtual_cpu,
Line 624:         cast(COALESCE(sum(num_of_sockets * cpu_per_socket * 
cast(vm_dynamic.status not in (0, 13 , 14, 15) as INTEGER)), 0) as INTEGER) as 
virtual_cpu_usage,
add comment for statuses meanings
Line 625:         quota_limitation.mem_size_mb,
Line 626:         COALESCE(sum(vm_static.mem_size_mb), 0) as mem_size_mb_usage
Line 627:     FROM quota_limitation
Line 628:         LEFT JOIN vm_static ON vm_static.quota_id = 
quota_limitation.quota_id


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 1010:                 if 
(!storagePoolQuotaMap.containsKey(quota.getStoragePoolId())) {
Line 1011:                     
storagePoolQuotaMap.put(quota.getStoragePoolId(), new HashMap<Guid,Quota>());
Line 1012:                 }
Line 1013:                 
storagePoolQuotaMap.get(quota.getStoragePoolId()).put(quota.getId(), quota);
Line 1014:             }
construct the map outside the lock.
Line 1015:         } finally {
Line 1016:             lock.writeLock().unlock();
Line 1017:         }
Line 1018:         long timeEnd = System.currentTimeMillis();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3db08957e413d2f1e0480b764334dd7268c8221
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to