Yair Zaslavsky has posted comments on this change. Change subject: core: Fast update quota cache ......................................................................
Patch Set 8: (3 inline comments) .................................................... 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: } Gilad - what map are you talking about? And why should it be outside the lock? not sure i fully understand Line 1015: } finally { Line 1016: lock.writeLock().unlock(); Line 1017: } Line 1018: long timeEnd = System.currentTimeMillis(); .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/QuotaDAODbFacadeImpl.java Line 182: } Line 183: return quotaEntity; Line 184: } Line 185: Line 186: private static ParameterizedRowMapper<Long> intMapper = new ParameterizedRowMapper<Long>() { intMapper for Long? nice ;) (and now, rename :) ) Line 187: @Override Line 188: public Long mapRow(ResultSet resultSet, int i) throws SQLException { Line 189: return (Long) resultSet.getObject(1); Line 190: } Line 205: @Override Line 206: public List<Quota> getAllQuotaIncludingConsumption() { Line 207: MapSqlParameterSource parameterSource = new MapSqlParameterSource(); Line 208: // get thin quota (only basic quota meta data) Line 209: List<Quota> allThinQuota = getCallsHandler().executeReadList("getAllThinQuota", getQuotaMetaDataFromResultSet(), parameterSource); And why cant we have all this code in stored proc? How often will it be called? Line 210: Line 211: if (allThinQuota != null && !allThinQuota.isEmpty()){ Line 212: Map<Guid, Quota> allQuotaMap = new HashMap<Guid, Quota>(); Line 213: for (Quota quota : allThinQuota) { -- 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 <oma...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.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