db_plugin.delete_ports() called plugin.delete_port() under
a transaction. It leads to long transaction if plugin.delete_port
talks with external systems. This commit changes each delete_port
outside of a transaction to avoid longer transaction.
plugin.delete_ports is now called by release_dhcp_ports and
dhcp-agent ports can be deleted separately, so this changes
does not break the existing behavior.
delete_ports is renamed to delete_ports_by_device_id
to clarify the usage of this method.
NEC plugin already has this change and it is no longer needed.
_do_side_effect helper method in test_db_plugin is renamed
to more self-descriptive name.
Reviewed: https:/ /review. openstack. org/78880 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=5e4b0c6fc66 70ea036d801ce53 444272bc311929
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5e4b0c6fc6670ea 036d801ce534442 72bc311929
Author: Akihiro Motoki <email address hidden>
Date: Fri Mar 7 15:58:46 2014 +0900
Avoid long transaction in plugin. delete_ ports()
db_ plugin. delete_ ports() called plugin. delete_ port() under
a transaction. It leads to long transaction if plugin.delete_port
talks with external systems. This commit changes each delete_port
outside of a transaction to avoid longer transaction.
plugin. delete_ ports is now called by release_dhcp_ports and
dhcp-agent ports can be deleted separately, so this changes
does not break the existing behavior.
delete_ports is renamed to delete_ ports_by_ device_ id
to clarify the usage of this method.
NEC plugin already has this change and it is no longer needed.
_do_side_effect helper method in test_db_plugin is renamed
to more self-descriptive name.
Change-Id: Ied5883a57c7774 c3b0778453d84c7 17b337f88c0
Closes-Bug: #1282925
Related-Bug: #1283522