Comment 7 for bug 1075369

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (stable/folsom)

Reviewed: https://review.openstack.org/16952
Committed: http://github.com/openstack/quantum/commit/ca7fc10dac532fdea5398b394ac3e58b1c3d8791
Submitter: Jenkins
Branch: stable/folsom

commit ca7fc10dac532fdea5398b394ac3e58b1c3d8791
Author: Dan Wendlandt <email address hidden>
Date: Tue Nov 27 13:14:54 2012 -0800

    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