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/8680 github. org/Juniper/ contrail- controller/ commit/ 745fae6af3e7afc 926dc50fa6c03c6 04e803853c
Committed: http://
Submitter: Zuul
Branch: R2.1
commit 745fae6af3e7afc 926dc50fa6c03c6 04e803853c
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