Avoid extra query when loading port security binding

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

Bug Description

Plugins supporting the port security extension perform an extra db query for each element being retrieved by get_networks and get_ports operation.

The extra query is performed in the following methods:
_extend_network_port_security_dict: https://github.com/openstack/neutron/blob/master/neutron/db/portsecurity_db.py#L54
_extend_port_port_security_dict: https://github.com/openstack/neutron/blob/master/neutron/db/portsecurity_db.py#L58

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 as it is currently the only plugin which enables this ext.

Tags: db nicira
Changed in neutron:
status: New → In Progress
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/39093

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/39093
Committed: http://github.com/openstack/neutron/commit/f581b2faf11b49852b0e1d6f2ddd8d19b8b69cdf
Submitter: Jenkins
Branch: master

commit f581b2faf11b49852b0e1d6f2ddd8d19b8b69cdf
Author: Salvatore Orlando <email address hidden>
Date: Mon Jul 15 00:21:12 2013 +0200

    Avoid performing extra query for fetching port security binding

    Bug 1201957

    Add a relationship performing eager load in Port and Network
    models, thus preventing the 'extend' function from performing
    an extra database query.
    Also fixes a comment in securitygroups_db.py

    Change-Id: If0f0277191884aab4dcb1ee36826df7f7d66a8fa

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.