]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
nec plugin: Avoid long transaction in delete_ports
authorAkihiro Motoki <motoki@da.jp.nec.com>
Fri, 21 Feb 2014 08:42:46 +0000 (17:42 +0900)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:39 +0000 (15:20 +0800)
commit66f3ef430ef30d602a35ed47c40a4af6c4b9dc18
treec551bbe8483cff4c15c9c5f8fa45b320ff09f1c4
parentf55142e907f18ee2a54f00b3bfc964b250c286d1
nec plugin: Avoid long transaction in delete_ports

db_plugin.delete_ports() can lead to long transaction
if plugin.deleete_port talks with external system.
This commit removes a transaction in delete_ports and
allows NEC plugin to use more granular db transactions
in delete_port. It greatly helps db race conditions and
timeouts in delete_port operations.

To avoid to impact other plugins/drivers by changing
db_plugin.delete_ports directly and to land this patch soon,
this commit overrides delete_ports() in NEC plugin.
Further disssion on transaction in delete_ports will be
discussed under bug 1282925.

Closes-Bug: #1282922
Related-Bug: #1282925

Change-Id: I2c00694ad34eb2058bf7a0ff1c920ceded327d43
neutron/plugins/nec/nec_plugin.py
neutron/tests/unit/nec/test_nec_plugin.py