neutron/neutron/db
Thomas Morin a08aa3bf2f 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-09 22:25:13 +00:00
..
allowed_address_pairs debtcollector for globals 2016-08-30 10:18:19 -04:00
availability_zone Decompose router extra attr processing 2017-01-12 02:20:58 -08:00
extra_dhcp_opt Switch to 'subquery' for 1-M relationships 2017-02-14 15:27:07 +00:00
metering Merge "DVR: Fix IPtables driver for metering with DVR routers" 2017-01-20 04:08:55 +00:00
migration Tag the alembic migration revisions for Ocata 2017-02-05 16:25:26 +00:00
models Switch to 'subquery' for 1-M relationships 2017-02-14 15:27:07 +00:00
network_dhcp_agent_binding Relocate Agent DB model 2016-10-07 14:18:19 -04:00
port_security Add missing revision number altercations 2016-09-25 02:18:01 -07:00
qos Switch to 'subquery' for 1-M relationships 2017-02-14 15:27:07 +00:00
quota Refactor/prepare db common utils for neutron-lib 2016-10-28 10:53:11 -04:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_utils.py Refactor/prepare db common utils for neutron-lib 2016-10-28 10:53:11 -04:00
address_scope_db.py Use project_id instead of tenant_id in objects 2017-01-13 14:31:26 +00:00
agents_db.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
agentschedulers_db.py Move AgentStatusCheckWorker to PeriodicWorker 2016-11-17 15:31:19 -08:00
allowedaddresspairs_db.py objects: add delete_objects public method 2016-12-13 17:35:47 +00:00
api.py Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
common_db_mixin.py Add work-around for older oslo.db 2017-04-07 14:52:36 +00:00
db_base_plugin_common.py Add IPAllocations to the port fixed_ips 2017-04-27 17:43:56 +00:00
db_base_plugin_v2.py Allow self-sharing RBAC rules to be deleted without usage check 2017-05-02 15:50:39 -04:00
dns_db.py Add OVO for dns Objects 2016-10-27 17:39:45 +00:00
dvr_mac_db.py Use new enginefacade for dvr mac db 2017-01-13 13:06:06 +00:00
external_net_db.py Merge "Stop using .delete() in external net handling code" 2017-01-10 15:57:50 +00:00
extradhcpopt_db.py Integrate the Extra Dhcp Opt VersionedObject in Neutron 2016-04-07 16:44:33 +01:00
extraroute_db.py Restore extraroute dict after OVO change 2016-12-14 23:50:19 +09:00
flavors_db.py Flavor and Service Profile to OVO 2017-01-05 16:59:36 -06:00
ipam_backend_mixin.py Merge "Fix DHCP Port Creation on Service Subnets" 2016-12-19 11:35:14 +00:00
ipam_pluggable_backend.py Handle auto-address subnets on port update 2017-04-05 08:24:20 +00:00
l3_agentschedulers_db.py Revert "Add ALLOCATING state to routers" 2017-01-09 15:56:09 +00:00
l3_attrs_db.py L3: Add in missing translation 2017-01-14 14:40:05 +02:00
l3_db.py Merge "Retry on routerport delete race" 2017-01-30 12:18:43 +00:00
l3_dvr_db.py Allow all migration of routers 2017-01-24 01:04:14 -05:00
l3_dvr_ha_scheduler_db.py Remove unused LOG 2016-07-05 15:22:13 +08:00
l3_dvrscheduler_db.py Fix typos 2017-01-18 15:48:32 +07:00
l3_gwmode_db.py Relocate L3 DB Models 2016-09-27 16:58:55 +00:00
l3_hamode_db.py l3_ha_mode: call bulk _populate_mtu_and_subnets_for_ports 2017-06-09 22:25:13 +00:00
l3_hascheduler_db.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
models_v2.py Avoid loading network and all rels for subnet query 2017-04-27 06:51:12 +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 Relocate PortBindingPort DB Model 2016-09-22 19:35:03 +00:00
portsecurity_db.py Use converters and validators from neutron-lib 2016-04-24 19:13:10 -04:00
portsecurity_db_common.py Refactor/prepare db common utils for neutron-lib 2016-10-28 10:53:11 -04:00
provisioning_blocks.py Integration of Provisioning Block OVO. 2017-02-02 19:16:55 +00:00
quota_db.py Create packages for quota modules 2015-07-28 11:55:01 -07:00
rbac_db_mixin.py Refactor/prepare db common utils for neutron-lib 2016-10-28 10:53:11 -04:00
rbac_db_models.py Use DB field sizes instead of _MAX_LEN constants 2016-12-23 13:48:57 +00:00
securitygroups_db.py Fix duplicated sg rules check for remote_ip_prefix 2017-03-03 21:01:59 +00:00
securitygroups_rpc_base.py Fix security group rules created for dhcpv6 2017-05-30 22:03:14 +00:00
segments_db.py Change passing session to context in segments db functions 2016-12-23 16:47:41 +04:00
servicetype_db.py objects: add delete_objects public method 2016-12-13 17:35:47 +00:00
sqlalchemytypes.py Truncate microseconds before DB insertion 2016-09-01 13:25:24 +00:00
standard_attr.py Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
standardattrdescription_db.py Add common way to extend standard attribute models 2016-09-15 01:42:24 +00:00
subnet_service_type_db_models.py debtcollector for globals 2016-08-30 10:18:19 -04:00
tag_db.py Relocate Tag DB model 2016-10-03 10:20:05 -05:00
vlantransparent_db.py Moving VLAN Transparency support from core to extension 2015-04-08 08:35:13 -07:00