]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Refactor retry mechanism used in some DB operations
authorEugene Nikanorov <enikanorov@mirantis.com>
Thu, 22 Jan 2015 12:54:29 +0000 (15:54 +0300)
committerAssaf Muller <amuller@redhat.com>
Fri, 13 Mar 2015 03:17:04 +0000 (23:17 -0400)
commit5dbb34b56fc42d9c68bf6647910a437a2ad6b29e
treeaff47c886283d3201d189ef82a3c26b6aec1fe18
parent48637c8933a0753b316eaf472a4a26ac41a4e009
Refactor retry mechanism used in some DB operations

Use oslo_db helper that will allow to restart the whole
transaction in case it needs a certain operation to be repeated.
This is a workaround for the REPEATABLE READ problem where
retrying logic will not work because queries inside a transation
will not see updates made by other transactions.
So, run every attempt in a separate transaction.

Change-Id: I68f9ae8019879725df58f5da2c83bb699a548255
Closes-Bug: #1382064
neutron/db/api.py
neutron/plugins/ml2/drivers/helpers.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/test_helpers.py
neutron/tests/unit/ml2/test_ml2_plugin.py