neutron/neutron/db
Doug Wiegley 2eb31f84c9 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.

Co-Authored-By: William Hager <whager@salesforce.com>
Change-Id: I34e41a128f28211f2e7ab814a2611ce22620fcf3
Closes-bug: 1810563
2019-01-23 18:30:54 +00:00
..
allowed_address_pairs Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
availability_zone remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
extra_dhcp_opt Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
metering use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
migration Use oslo_log instead of alembic.util in functional tests 2018-12-21 23:03:24 +01:00
models Add propagate_uplink_status to port 2018-11-29 19:33:16 +00:00
network_dhcp_agent_binding OVO for NetworkDhcpAgentBinding 2017-09-08 15:48:00 +00:00
port_security Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
qos [L3][QoS] Neutron server side router gateway IP QoS 2018-12-01 17:45:46 +08:00
quota use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_model_query.py Merge "Support fetching specific db column in OVO" 2018-12-20 03:56:14 +00:00
_utils.py use db utils from lib 2018-07-02 08:24:36 -06:00
address_scope_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
agents_db.py Merge "Use publish for AGENT AFTER_CREATE/AFTER_UPDATE" 2018-12-20 02:07:41 +00:00
agentschedulers_db.py Fix unscheduling fail when concurrent port delete 2018-06-09 02:58:20 +08:00
allowedaddresspairs_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
api.py remove context_manager from neutron 2018-12-18 12:26:53 -07:00
common_db_mixin.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
data_plane_status_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
db_base_plugin_common.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
db_base_plugin_v2.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
dns_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
dvr_mac_db.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
external_net_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
extradhcpopt_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
extraroute_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
flavors_db.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
ipam_backend_mixin.py Convert Subnet to OVO in ipam_pluggable_backend.py 2018-12-20 15:52:50 +00:00
ipam_pluggable_backend.py Convert Port to OVO in db/ipam_pluggable_backend.py 2018-12-20 15:56:48 +00:00
l3_agentschedulers_db.py Merge "Update _check_router_retain_needed()" 2018-07-20 05:14:29 +00:00
l3_attrs_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_db.py Merge "remove the neutron.db._resource_extend module" 2019-01-08 07:21:45 +00:00
l3_dvr_db.py Refactor some l3_dvr_db code 2019-01-09 18:55:56 +00:00
l3_dvr_ha_scheduler_db.py Fix connection between 2 dvr routers 2018-11-01 18:01:25 +01:00
l3_dvrscheduler_db.py Merge "DVR: Centralized FloatingIPs are not cleared after migration." 2018-11-15 09:37:22 +00:00
l3_fip_pools_db.py Introduce floating IP pool resource 2018-10-04 15:53:53 +00:00
l3_fip_port_details.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_fip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gateway_ip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gwmode_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_hamode_db.py Merge "Fix dvr ha router gateway goes wrong host" 2018-10-22 10:29:24 +00:00
l3_hascheduler_db.py Fix all pep8 E129 errors 2018-05-03 13:44:04 +09:00
models_v2.py Revert "Update network revision only when it needs" 2018-08-14 21:06:21 +00:00
network_ip_availability_db.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
portbindings_base.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portbindings_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portsecurity_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portsecurity_db_common.py use db utils from lib 2018-07-02 08:24:36 -06:00
provisioning_blocks.py Fix flake8 N534 untranslated exception message 2018-10-19 15:46:04 -04:00
quota_db.py Create packages for quota modules 2015-07-28 11:55:01 -07:00
rbac_db_mixin.py Use RBACBaseObject OVO in neutron/db/rbac_db_mixin.py 2018-11-08 13:41:36 +00:00
rbac_db_models.py Use RBACBaseObject OVO in neutron/db/rbac_db_mixin.py 2018-11-08 13:41:36 +00:00
securitygroups_db.py Fix performance regression adding rules to security groups 2019-01-23 18:30:54 +00:00
securitygroups_rpc_base.py use retry_if_session_inactive from neutron-lib 2018-10-12 14:47:35 -06:00
segments_db.py use context manager from neutron-lib 2018-10-24 07:18:46 -06:00
servicetype_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
sqlalchemytypes.py For typo in sqlalchemytypes 2017-02-13 16:18:46 +00:00
standard_attr.py Fix flake8 N534 untranslated exception message 2018-10-19 15:46:04 -04:00
standardattrdescription_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
subnet_service_type_mixin.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
uplink_status_propagation_db.py Add propagate_uplink_status to port 2018-11-29 19:33:16 +00:00
vlantransparent_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00