From ea254d39679c026878e0b8fd4e718a49de83aa83 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Tue, 29 Sep 2015 09:15:50 -0700 Subject: [PATCH] Add deadlock warning to 'effective neutron' Change-Id: Iaf9bd0b5d84ecb4f4de406e632c0d05327621bcb --- doc/source/devref/effective_neutron.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/devref/effective_neutron.rst b/doc/source/devref/effective_neutron.rst index 98bf8e9fb..785859bf8 100644 --- a/doc/source/devref/effective_neutron.rst +++ b/doc/source/devref/effective_neutron.rst @@ -77,6 +77,12 @@ Eventlet concurrent model Document common pitfalls as well as good practices done when using eventlet and monkey patching. +* Do not use with_lockmode('update') on SQL queries without protecting the operation + with a lockutils semaphore. For some SQLAlchemy database drivers that operators may + choose (e.g. MySQLdb) it may result in a temporary deadlock by yielding to another + coroutine while holding the DB lock. The following wiki provides more details: + https://wiki.openstack.org/wiki/OpenStack_and_SQLAlchemy#MySQLdb_.2B_eventlet_.3D_sad + Mocking and testing ~~~~~~~~~~~~~~~~~~~ -- 2.45.2