]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
BSN: Remove db lock and add missing contexts
authorKevin Benton <blak111@gmail.com>
Tue, 1 Jul 2014 13:03:19 +0000 (06:03 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 1 Jul 2014 15:22:50 +0000 (08:22 -0700)
commitee9fe2458f813b5d367bc7263c7a30a3af46aa2b
treeb80ff9c59cd04be9cb62195242ae6304f111c7f1
parentb5cd4c7cef64491069ae7461f0e5ee89568ec495
BSN: Remove db lock and add missing contexts

Adds context tracking decorators that were missing
from router interface methods. Without them, new
sessions were being created instead of using the
existing context which was causing transaction
issues.

Modifies the servermanager to store context references
as weakrefs so if multiple functions are called before
the rest functions are called, the first one doesn't steal
the only context reference with a pop() call.

Removes a DB lock for update in the server manager that occured
during rest calls that was triggering deadlocks due to the
file lock synchronization for the rest calls.

Closes-Bug: #1336251
Change-Id: Iad3d61e2c23832b3ad760a999fbab7feaa13f805
neutron/plugins/bigswitch/db/consistency_db.py
neutron/plugins/bigswitch/plugin.py
neutron/plugins/bigswitch/servermanager.py