Multiple db calls in some quota methods

Bug #1277068 reported by Liyingjun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Liyingjun
oslo-incubator
Fix Released
Undecided
Liyingjun

Bug Description

in nova/quota.py
db.quota_get_all_by_project is called twice in method limit_check(): https://github.com/openstack/nova/blob/master/nova/quota.py#L356 and
reserve(): https://github.com/openstack/nova/blob/master/nova/quota.py#L424

db.quota_get_all_by_project_and_user is called twice in method get_settable_quotas(): https://github.com/openstack/nova/blob/master/nova/quota.py#L272

Liyingjun (liyingjun)
Changed in nova:
assignee: nobody → Liyingjun (liyingjun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/71528

Changed in nova:
status: New → In Progress
Liyingjun (liyingjun)
Changed in oslo:
assignee: nobody → Liyingjun (liyingjun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/71537

Changed in oslo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/71528
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=67582831e2171cb6bee6af53630ba6d1dc80d7bd
Submitter: Jenkins
Branch: master

commit 67582831e2171cb6bee6af53630ba6d1dc80d7bd
Author: liyingjun <email address hidden>
Date: Wed Jan 15 00:34:07 2014 +0800

    Merge same db calls for some quota methods

    db.quota_get_all_by_project is called twice in method limit_check()
    and reserve(),
    db.quota_get_all_by_project_and_user is called twice in method
    get_settable_quotas() in nova/quota.py

    Change-Id: Ie5e3a414d3d52964c16613f44fe60a7f68bc0c66
    Closes-bug: 1277068

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/71537
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=67864735a86c8b3fed5d0c27f51760bfb6f458bd
Submitter: Jenkins
Branch: master

commit 67864735a86c8b3fed5d0c27f51760bfb6f458bd
Author: liyingjun <email address hidden>
Date: Wed Jan 15 01:11:29 2014 +0800

    Merge same db calls for some quota methods

    self.db.quota_get_all_by_project is called twice in method limit_check()
    and reserve(),
    self.db.quota_get_all_by_project_and_user is called twice in method
    get_settable_quotas()

    Change-Id: Ibe41f49afe16c220ca663a7ad13b61acc08c7775
    Closes-bug: 1277068

Changed in oslo:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-3
Changed in oslo:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.