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
Reviewed: https:/ /review. opencontrail. org/8550 github. org/Juniper/ contrail- controller/ commit/ 2310b68507a7ec9 0fa51d0f778ffa3 2c0e8876ef
Committed: http://
Submitter: Zuul
Branch: master
commit 2310b68507a7ec9 0fa51d0f778ffa3 2c0e8876ef
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: I0c054fcf5f8551 82baef93e14eeef fae8c8993b1
Closes-Bug: 1435458