Optimize "QosPolicy" OVO bound objects retrieve methods

Bug #1877560 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

The following methods are inefficient:
- get_bound_networks
- get_bound_ports
- get_bound_floatingips
- get_bound_routers

Those methods, using the "QosPolicy_XXXX_Binding" OVO interface, are retrieving all objects with a certain policy ID and then returning only the ID of the _XXXX_ object. That means we retrieve a full register list from the DB, then those registers are converted to OVO and then we extract only the _XXXX_ ID.

This is obviously inefficient, regardless of the simplicity of the "QosPolicy_XXXX_Binding" OVO and the 1:1 parity to the DB associated register. We should instead only retrieve the _XXXX_ object ID from the DB and return it.

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/726358

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

Reviewed: https://review.opendev.org/726358
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1f018514d71daab6ff3d4bd508318ce8ed8d1045
Submitter: Zuul
Branch: master

commit 1f018514d71daab6ff3d4bd508318ce8ed8d1045
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri May 8 11:32:17 2020 +0000

    Optimize QoS bound objects queries

    Optimize the following methods:
    - get_bound_networks
    - get_bound_ports
    - get_bound_floatingips
    - get_bound_routers

    Those methods, using the "QosPolicy_XXXX_Binding" OVO interface, were
    retrieving all objects with a certain policy ID and then returning
    only the ID of the _XXXX_ object. That means to retrieve a full
    register list from the DB, then converted them to OVOs and extract
    only the _XXXX_ ID.

    This patch retrieves only the _XXXX_ object IDs from the DB and
    returns the list, without the OVO conversion.

    Change-Id: I891eba93b3b4abaec8ada13a032b5440cbb0548d
    Closes-Bug: #1877560

Changed in neutron:
status: In Progress → Fix Released
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.