neutron/neutron
Doug Wiegley f8a192e22e
Fix performance regression adding rules to security groups
Sometime between liberty and pike, adding rules to SG's got
slow, and slower with every rule. Streamline the rule create path,
and get close to the old performance back.

Two performance fixes:
1. Get rid of an n^2 duplicate check, using a hash table instead,
on bulk creates. This is more memory intensive than the previous loop,
but usable far past where the other becomes too slow to be useful.
2. Use an object existence check in a few places where we do not
want to load all of the child rules.

Also squashed in:
Restore tenant_id check on security group rule adds to previous semantic

We switched from swapping the tenant_id in the context to explicitly
checking the db column. Switch back, and a test that checks for
not breaking this rather odd behavior. At least, until we decide
to fix it as a bug.

Co-Authored-By: William Hager <whager@salesforce.com>
Change-Id: I34e41a128f28211f2e7ab814a2611ce22620fcf3
Closes-bug: 1810563
(cherry picked from commit 2eb31f84c9)
(squashed patch from commit bd4c291cdf)
2019-02-01 21:07:58 -07:00
..
agent Merge "protect DHCP agent cache out of sync" into stable/rocky 2019-01-24 02:09:43 +00:00
api Block port update from unbound DHCP agent 2018-12-18 11:11:35 +00:00
cmd Fix exception in neutron-sanity-check 2018-06-13 18:21:14 +00:00
common Allow Ipv6 addresses for nova_metadata_host 2018-10-13 07:14:05 +00:00
conf Implement filter validation 2018-07-19 04:13:43 +00:00
core_extensions Refactor duplicated implementation of _get_policy_obj 2018-06-20 09:51:02 +08:00
db Fix performance regression adding rules to security groups 2019-02-01 21:07:58 -07:00
debug Fix all pep8 E265 errors 2018-04-30 16:35:52 -04:00
extensions [server side] Expose port forwardings in FIP API 2018-07-27 17:25:10 +08:00
hacking use sqla functions from neutron-lib 2018-07-25 21:04:20 +00:00
ipam Fetch specific columns rather than full ORM entities 2018-09-27 16:28:37 +00:00
locale Imported Translations from Zanata 2018-11-30 09:16:33 +00:00
notifiers Fix W503 pep8 warnings 2018-04-17 14:22:58 +00:00
objects Fix performance regression adding rules to security groups 2019-02-01 21:07:58 -07:00
pecan_wsgi Implement filter validation 2018-07-19 04:13:43 +00:00
plugins Clear residual qos rules after l2-agent restarts. 2019-01-22 12:59:24 +00:00
privileged Add capabilities for privsep 2018-10-29 11:28:27 +00:00
quota Fetch specific columns rather than full ORM entities 2018-09-27 16:28:37 +00:00
scheduler Fetch specific columns rather than full ORM entities 2018-09-27 16:28:37 +00:00
server Allow neutron-api load config from WSGI process 2018-07-25 15:22:14 +07:00
services Do not delete trunk bridges if service port attached 2018-12-17 12:18:44 +00:00
tests Fix performance regression adding rules to security groups 2019-02-01 21:07:58 -07:00
__init__.py
_i18n.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
auth.py Use oslo.context class method to construct context object 2017-03-23 09:02:46 +00:00
manager.py Implement filter validation 2018-07-19 04:13:43 +00:00
neutron_plugin_base_v2.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
opts.py Merge "Remove deprecated cache_url" 2018-01-03 06:35:59 +00:00
policy.py Add ext_parent policy check 2018-08-01 02:45:42 +08:00
service.py Allow neutron-api load config from WSGI process 2018-07-25 15:22:14 +07:00
version.py
worker.py replace WorkerSupportServiceMixin with neutron-lib's WorkerBase 2017-06-14 06:56:48 -06:00
wsgi.py Fix all pep8 E265 errors 2018-04-30 16:35:52 -04:00