]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "Remove db-access semaphore in ML2"
authorJenkins <jenkins@review.openstack.org>
Wed, 15 Jul 2015 21:58:42 +0000 (21:58 +0000)
committerGerrit Code Review <review@openstack.org>
Wed, 15 Jul 2015 21:58:42 +0000 (21:58 +0000)
1  2 
neutron/plugins/ml2/plugin.py

index aee467d3b6a40f3d0e158c1143b450f56778c576,9c89a28f7cbb838e7fae238168a0fd9f9e5b9134..89a64609a327678b57f9174c49b71f23e224bdd2
@@@ -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)