OpenStack Networking (Neutron)
Go to file
Brian Haley 05fcfef6ce Change to use selectin for DB load strategy
During a mailing list discussion on some OOM issues neutron
has been seeing [0], Mike Bayer recommended we should change
from using subquery to selectin DB load strategy.

A full description of this strategy can be found here [1],
but in short:

- “subquery” loading incurs additional performance / complexity
  issues when used on a many-levels-deep eager load, as
  subqueries will be nested repeatedly.

- "The subqueryload() eager loader is mostly legacy at this
  point, superseded by selectinload()

- "The only scenario in which selectin eager loading is not
  feasible is when the model is using composite primary keys,
  and the backend database does not support tuples with IN,
  which currently includes SQL Server." So that does not
  apply to us.

The plan agreed to at the neutron drivers meeting [2] was to
make this change early in the cycle so we would be able to
see if there were any issues through the D cycle.

Added hacking checks so new code using subquery loads is
not added back.

[0] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/EHLQQXNG3NLLZYPDGG2ES3DINIJ7YT3N/
[1] https://docs.sqlalchemy.org/en/20/orm/queryguide/relationships.html#selectin-eager-loading
[2] https://meetings.opendev.org/meetings/neutron_drivers/2024/neutron_drivers.2024-05-31-14.00.log.html#l-67

Closes-bug: #2067770
Depends-on: https://review.opendev.org/c/openstack/neutron-lib/+/920936
Change-Id: I6e40a15284da392a3d48d45205a7a5770c14c297
2024-06-12 11:31:22 -04:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
devstack Remove note about migration from lib/neutron-legacy to lib/neutron 2022-12-20 11:05:05 +01:00
doc Merge "Remove old excludes" 2024-06-12 00:09:39 +00:00
etc [S-RBAC] Change policies for port's binding:profile field 2024-02-16 16:10:43 +01:00
neutron Change to use selectin for DB load strategy 2024-06-12 11:31:22 -04:00
playbooks Add some swap to tox-cover job 2024-06-06 11:13:54 +05:30
rally-jobs [ci] Fix several rally task arguments 2020-05-06 14:56:27 +03:00
releasenotes reno: ml2/ovn allows to create/delete trunks for bound ports 2024-05-31 15:39:39 +00:00
roles Restore the tempest nftables jobs in experimental and periodic queues 2023-10-11 13:27:17 +00:00
tools Add pre-commit configuration 2024-05-02 10:46:27 +00:00
vagrant/ovn Fix local neutron folder path in ovn/sparse/Vagrantfile 2020-11-03 17:02:34 +01:00
zuul.d Fix regex lines in zuul.d/* files 2024-06-06 11:37:52 +05:30
.coveragerc Exclude files from coverage check, improve overall result 2024-03-05 08:13:17 +00:00
.gitignore Ignore reno artefacts (RELEASENOTES.rst and reno.cache) 2023-01-18 04:52:03 +01:00
.gitreview OpenDev Migration Patch 2019-04-19 19:38:27 +00:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pre-commit-config.yaml Add pre-commit configuration 2024-05-02 10:46:27 +00:00
.pylintrc Fix the broken neutron gate 2024-05-15 16:13:38 +02:00
.stestr.conf Fix post gate hook to accommodate for new os-testr 2017-09-12 14:20:12 -06:00
bindep.txt Fix bindep for Debian bookworm 2023-08-21 13:57:00 +00:00
CONTRIBUTING.rst [Community goal] Add contributor and PTL guide 2020-03-03 04:43:26 +01:00
HACKING.rst Update hacking version 2024-02-08 10:34:10 -05:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
plugin.spec Update url and package name 2023-03-28 06:59:20 +00:00
README.rst Doc: make the contributor guide more visible 2022-07-14 13:08:56 +02:00
requirements.txt Merge "Bump neutron-lib to 3.13.0" 2024-06-11 18:04:21 +00:00
setup.cfg [OVN] Implement OVN agent metadata extension 2024-03-05 16:44:34 +00:00
setup.py Cleanup setup.py and requirements 2024-01-12 17:44:09 +09:00
test-requirements.txt Remove old excludes 2024-05-21 13:17:36 -04:00
TESTING.rst Amend documentation for fullstack tests 2022-12-08 14:29:34 +01:00
tox.ini Change to use selectin for DB load strategy 2024-06-12 11:31:22 -04:00

OpenStack Neutron

image

Neutron is an OpenStack project to provide "network connectivity as a service" between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova).

To learn more about neutron:

If you would like to contribute to Neutron, please read the file CONTRIBUTING.rst or see the Neutron contributor guide:

https://docs.openstack.org/neutron/latest/contributor/contributing.html

Get in touch via email. Use [Neutron] in your subject.