← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1441790] [NEW] Simplify and modernize model_query()

 

Public bug reported:

>From zzzeek on IRC, 2015-04-08:

this thing:
https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L486

this is in a few places.   the model_query() for neutron is broken up
into these three awkward phases, and seveal of these pliugins put an
unnecessary and expensive OUTER JOIN on all queries

this should be an INNER JOIN and only when the filter_hook is actually
in use

now its hard for me to change this b.c. everyone will be like, it works great and nobody uses that thing so who cares
but i really want to fix up how we build queries to be cleaner, using newer techniques

there’s a quick cahnge we can make right there that will probably corect
the outerjoin, we can do query.join() right in the
_ml2_port_result_filter_hook for now

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: db

** Tags added: db

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1441790

Title:
  Simplify and modernize model_query()

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  From zzzeek on IRC, 2015-04-08:

  this thing:
  https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L486

  this is in a few places.   the model_query() for neutron is broken up
  into these three awkward phases, and seveal of these pliugins put an
  unnecessary and expensive OUTER JOIN on all queries

  this should be an INNER JOIN and only when the filter_hook is actually
  in use

  now its hard for me to change this b.c. everyone will be like, it works great and nobody uses that thing so who cares
  but i really want to fix up how we build queries to be cleaner, using newer techniques

  there’s a quick cahnge we can make right there that will probably
  corect the outerjoin, we can do query.join() right in the
  _ml2_port_result_filter_hook for now

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1441790/+subscriptions


Follow ups

References