diff options
author | shenjiatong <yshxxsjt715@gmail.com> | 2022-05-15 10:12:47 +0800 |
---|---|---|
committer | norman shen <yshxxsjt715@gmail.com> | 2022-05-17 01:50:37 +0000 |
commit | eb63fa883c7f05f806c213b40de158efaa5aed07 (patch) | |
tree | a2df519ab9868b4e47b37b3031d2db7bd711b0cd /neutron | |
parent | f181a8f3b74376a497b38170e56dfc177b6cf6bc (diff) | |
download | neutron-eb63fa883c7f05f806c213b40de158efaa5aed07.tar.gz |
Do not auto subquery load DistributedPortBindings
We observe excessive DB calls to load DistributedPortBindings,
We have enabled DVR and have some huge virtual routers with around
60 router interfaces scheduled on around 200 compute nodes. Under such
situation, subquery load DistributedPortBinding looks like not a very wise
idea, because it is not explicitly used.
I glance through the code and have a feeling that ml2_distributed_port_bindings
is not used except explicitly called. So IMO it is safe to change it to
default lazy load without causing serious regression.
Closes-bug: #1973576
Change-Id: Ib2c48bd5ad55e9c754a8e4938e6c5eafacc75dcc
(cherry picked from commit 182044d628314290a38440bab203d27fb9db755d)
Diffstat (limited to 'neutron')
-rw-r--r-- | neutron/plugins/ml2/models.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/neutron/plugins/ml2/models.py b/neutron/plugins/ml2/models.py index e4bf8de335..6061eaa1bd 100644 --- a/neutron/plugins/ml2/models.py +++ b/neutron/plugins/ml2/models.py @@ -129,6 +129,5 @@ class DistributedPortBinding(model_base.BASEV2): models_v2.Port, load_on_pending=True, backref=orm.backref("distributed_port_binding", - lazy='subquery', cascade='delete')) revises_on_change = ('port', ) |