neutron/neutron/db
Thomas Morin e6c1d6dc0f l3_ha_mode: call bulk _populate_mtu_and_subnets_for_ports
Based on the observation that a call to sync_routers can be very
slow (minutes) on some setup, and that profiling data show that
a significant amount of time is spent in many individual calls
of _process_sync_ha_data to _populate_mtu_and_subnets_for_ports for
a single interface, this change refactors _process_sync_ha_data to
call _populate_mtu_and_subnets_for_ports only once on a list of
interfaces instead of <n> times.

Said otherwise:
- before: O(#routers) SQL queries
          (one per network of an HA interface of a router)
- after : O(1) SQL queries
          (on the set of networks with an HA interface on a router)

A basic test shows a drastic improvements, from minutes to around
one second, in the processing of a sync_routers call with 256 routers.

Change-Id: I3a00c8fbb245ab3b6d93bdaa97f3435570992791
Related-Bug: 1692971
2017-06-02 20:20:30 +00:00
..
allowed_address_pairs debtcollector for globals 2016-08-30 10:18:19 -04:00
availability_zone Trival: Remove unused logging import 2015-12-26 12:49:56 +08:00
extra_dhcp_opt Switch to 'subquery' for 1-M relationships 2017-03-27 11:03:53 +00:00
metering DVR: Fix IPtables driver for metering with DVR routers 2017-01-24 13:27:32 -08:00
migration Manually add pk for alembic_version table 2017-01-25 11:48:58 +04:00
models Switch to 'subquery' for 1-M relationships 2017-03-27 11:03:53 +00:00
network_dhcp_agent_binding Switch to neutron-lib for model_base 2016-08-31 11:12:18 -04:00
port_security Add missing revision number altercations 2016-09-26 20:55:48 +00:00
qos Switch to 'subquery' for 1-M relationships 2017-03-27 11:03:53 +00:00
quota Mark quota operations as retriable 2016-09-13 10:33:10 +00:00
__init__.py
address_scope_db.py debtcollector for globals 2016-08-30 10:18:19 -04:00
agents_db.py Mark agents db mixin operations retriable 2016-09-09 09:00:10 +00:00
agentschedulers_db.py Switch to neutron-lib for model_base 2016-08-31 11:12:18 -04:00
allowedaddresspairs_db.py objects: expose database model for NeutronDbObject instances 2016-09-10 03:53:17 +00:00
api.py Mark quota operations as retriable 2016-09-13 10:33:10 +00:00
common_db_mixin.py Add work-around for older oslo.db 2017-04-07 14:53:16 +00:00
db_base_plugin_common.py Add IPAllocations to the port fixed_ips 2017-04-27 17:44:59 +00:00
db_base_plugin_v2.py Allow self-sharing RBAC rules to be deleted without usage check 2017-04-17 20:02:10 -07:00
dns_db.py Add missing revision number altercations 2016-09-26 20:55:48 +00:00
dvr_mac_db.py Utilize retry_if_session_inactive in dvr_mac_db 2016-09-14 01:33:02 +00:00
external_net_db.py Get rid of _network_model_hook for external_net 2017-03-17 11:07:57 +01:00
extradhcpopt_db.py Integrate the Extra Dhcp Opt VersionedObject in Neutron 2016-04-07 16:44:33 +01:00
extraroute_db.py Add missing revision number altercations 2016-09-26 20:55:48 +00:00
flavors_db.py Detect DBReferenceError when deleting flavor 2016-09-07 22:07:41 -07:00
ipam_backend_mixin.py Fix DHCP Port Creation on Service Subnets 2016-12-19 16:06:01 +00:00
ipam_pluggable_backend.py Handle auto-address subnets on port update 2017-04-05 08:24:33 +00:00
l3_agentschedulers_db.py Merge "Only schedule routers from drivers that need it" 2016-09-07 19:04:04 +00:00
l3_attrs_db.py Add missing revises_on_change attribute 2017-01-16 08:18:18 -08:00
l3_db.py L3: Only send notifications if l3 plugin exists 2017-03-07 10:51:01 +01:00
l3_dvr_db.py Migrate device_owner for router's interface 2016-12-01 07:47:35 +00:00
l3_dvr_ha_scheduler_db.py Remove unused LOG 2016-07-05 15:22:13 +08:00
l3_dvrscheduler_db.py Neutron-lib: use the L3_AGENT* definitions from neutron-lib 2016-08-01 06:50:11 -07:00
l3_gwmode_db.py Trival: Remove unused logging import 2015-12-26 12:49:56 +08:00
l3_hamode_db.py l3_ha_mode: call bulk _populate_mtu_and_subnets_for_ports 2017-06-02 20:20:30 +00:00
l3_hascheduler_db.py Check for ha port to become ACTIVE 2016-08-29 19:31:22 +03:00
model_base.py Switch to neutron-lib for model_base 2016-08-31 11:12:18 -04:00
models_v2.py Switch to 'subquery' for 1-M relationships 2017-03-27 11:03:53 +00:00
netmtu_db.py Calculate MTU on every network fetch instead of on create 2016-07-20 13:26:50 +02:00
network_ip_availability_db.py IP Availability: remove unused imports 2016-03-01 07:06:10 -08:00
portbindings_base.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
portbindings_db.py Add missing revises_on_change attribute 2017-01-16 08:18:18 -08:00
portsecurity_db.py Use converters and validators from neutron-lib 2016-04-24 19:13:10 -04:00
portsecurity_db_common.py objects: introduce NetworkPortSecurity object 2016-06-27 18:35:47 +02:00
provisioning_blocks.py Add retry decorator to provisioning blocks module 2016-09-14 02:33:07 +00:00
quota_db.py Create packages for quota modules 2015-07-28 11:55:01 -07:00
rbac_db_mixin.py Add retry decorator to RBAC module 2016-09-09 09:00:23 +00:00
rbac_db_models.py Switch to neutron-lib for model_base 2016-08-31 11:12:18 -04:00
securitygroups_db.py Fix duplicated sg rules check for remote_ip_prefix 2017-05-05 15:23:17 +02:00
securitygroups_rpc_base.py Protect security group operations with the retry decorator 2016-09-13 01:18:12 -07:00
segments_db.py Add common way to extend standard attribute models 2016-09-16 18:16:29 +00:00
servicetype_db.py Switch to neutron-lib for model_base 2016-08-31 11:12:18 -04:00
sqlalchemytypes.py Truncate microseconds before DB insertion 2016-09-01 13:25:24 +00:00
sqlalchemyutils.py Use paginate_query from oslo_db 2016-04-27 03:12:24 +00:00
standard_attr.py Add common way to extend standard attribute models 2016-09-16 18:16:29 +00:00
standardattrdescription_db.py Add common way to extend standard attribute models 2016-09-16 18:16:29 +00:00
subnet_service_type_db_models.py debtcollector for globals 2016-08-30 10:18:19 -04:00
tag_db.py Switch to neutron-lib for model_base 2016-08-31 11:12:18 -04:00
vlantransparent_db.py Moving VLAN Transparency support from core to extension 2015-04-08 08:35:13 -07:00