Comment 9 for bug 1435458

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8550
Committed: http://github.org/Juniper/contrail-controller/commit/2310b68507a7ec90fa51d0f778ffa32c0e8876ef
Submitter: Zuul
Branch: master

commit 2310b68507a7ec90fa51d0f778ffa32c0e8876ef
Author: Prakash Bailkeri <email address hidden>
Date: Mon Mar 23 10:55:31 2015 -0700

Optimise quota check

while checking the quota for a resource type, the project is read fully and then counted for the resource.
There are two issues
1. this query for project is done even without quota enabled for resource
2. Project read and json encoding is expensive with too many VMIs under it

Solution:
1. Introduce new API for reading child count. (e.g read number of VMI under a project)
2. Check for the resourece count only if quota check is enabled for the resource

Change-Id: I0c054fcf5f855182baef93e14eeeffae8c8993b1
Closes-Bug: 1435458