Avoid extra query when loading mac learning binding

Bug #1214879 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Salvatore Orlando

Bug Description

The nicira plugin supports the 'mac learning' extension, and for this it performs an extra db query for each element being retrieved by the get_ports operation.

Using similar technicques adopted for other API extensions, this extra query, which negatively impacts performance and scalability, should be removed.

This bug affects only the nicira plugin.

Tags: db nicira
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

Reviewed: https://review.openstack.org/43118
Committed: http://github.com/openstack/neutron/commit/417dd1727ba38966f53e83c69583650f2cf190fc
Submitter: Jenkins
Branch: master

commit 417dd1727ba38966f53e83c69583650f2cf190fc
Author: Salvatore Orlando <email address hidden>
Date: Wed Aug 21 05:14:54 2013 -0700

    Avoid performing extra query for fetching mac learning binding

    Bug 1214879

    Add a relationship performing eager load in the Port model, thus preventing
    the 'extend' function from performing an extra query.
    This patch also replaces assertTrue with assertEqual in unit tests as it
    needs to evaluate whether the value of the mac_learning_enabled attribute
    is equal to the boolean literal True, whereas assertTrue verifies that the
    expression passed to it evaluates to True. This means that any value but
    False will be enough for the test to pass, which is not correct.

    Change-Id: I03345ef3a125fdfa1ec7f6c3363d76efc12ced82

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
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.