From: Jenkins Date: Wed, 15 Jul 2015 21:58:42 +0000 (+0000) Subject: Merge "Remove db-access semaphore in ML2" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dfb7c826d0846970bac00003cea98c9f6bd8f0b8;p=openstack-build%2Fneutron-build.git Merge "Remove db-access semaphore in ML2" --- dfb7c826d0846970bac00003cea98c9f6bd8f0b8 diff --cc neutron/plugins/ml2/plugin.py index aee467d3b,9c89a28f7..89a64609a --- a/neutron/plugins/ml2/plugin.py +++ b/neutron/plugins/ml2/plugin.py @@@ -1101,14 -1088,8 +1088,9 @@@ class Ml2Plugin(db_base_plugin_v2.Neutr attrs = port[attributes.PORT] need_port_update_notify = False session = context.session + bound_mech_contexts = [] - # REVISIT: Serialize this operation with a semaphore to - # prevent deadlock waiting to acquire a DB lock held by - # another thread in the same process, leading to 'lock wait - # timeout' errors. - with lockutils.lock('db-access'),\ - session.begin(subtransactions=True): + with session.begin(subtransactions=True): port_db, binding = db.get_locked_port_and_binding(session, id) if not port_db: raise exc.PortNotFound(port_id=id)