Gilad Chaplik has posted comments on this change.

Change subject: core: Fast init cache
......................................................................


Patch Set 6: (2 inline comments)

....................................................
File backend/manager/dbscripts/quota_sp.sql
Line 73: BEGIN
Line 74:     RETURN QUERY SELECT cast(count(*) as INTEGER) as num_quota
Line 75:     FROM quota;
Line 76: END; $procedure$
Line 77: LANGUAGE plpgsql;
you call getAll in init
Line 78: 
Line 79: Create or replace FUNCTION GetQuotaStorageByQuotaGuid(v_id UUID)
Line 80: RETURNS SETOF quota_storage_view
Line 81:    AS $procedure$


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 1028:         } finally {
Line 1029:             lock.readLock().unlock();
Line 1030:         }
Line 1031: 
Line 1032:         return cacheCount < quotaCount * MINIMUM_CACHE_FACTOR;
ok, now it's ok, but:
I think the factor should be related to cache misses instead of quota count, 
reinit the cache according to quota count should be handled in add/remove 
quota, and not every interval.
BTW can we know about cache misses? apparently no because it was a bug :) so if 
adding factors I would say it should be in consume_quota method. in problematic 
setup we can activate this factor, and reinit the cache every XXX quota 
consumption (maybe in an async manner).
Line 1033:     }


--
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: 6
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

Reply via email to