Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use DB count to get resource counts.
Fixes bug 1075369, and includes bugs 1081259, 1083696 which fixed regression in the original version of this patch and bug 1083180 which improves the documentation of the original patch. During quota check we used to simply retrieve the entire collection of resources from the database, then counting them in Python. This patch introduces a specialized _get_collection_count() method, which instead take advantage of the DB's built-in count capabilities. In order to take advantage of this, plugins can now implement get_*_count() methods for their resources. This is used (if present) by the quota checking function. Change-Id: Idc347cfacc363f2cac47356296514fe735625f29
- Loading branch information
Dan Wendlandt
committed
Nov 27, 2012
1 parent
66605e8
commit ca7fc10
Showing
9 changed files
with
158 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters