Use a threadpool for db access

Registered by Vish Ishaya on 2012-04-05

Any db query blocks all greenthreads in each worker. This is because we are using a c mysql library which is not monkeypatched by eventlet. The solution to this is to use a threadpool. Unfortunately our last attempt to switch sqlalchemy over to using a threadpool lead to some issues. We need to reinvestigate and fix or workaround the sqlalchemy problems.

Blueprint information

Status:
Complete
Approver:
Vish Ishaya
Priority:
Low
Drafter:
None
Direction:
Needs approval
Assignee:
Matt Stephenson
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Russell Bryant on 2013-03-29

Related branches

Sprints

Whiteboard

This was implemented as: https://blueprints.launchpad.net/nova/+spec/non-blocking-db

previous bug: https://bugs.launchpad.net/nova/+bug/838581

Recent retry showed the following traceback: http://paste.openstack.org/show/12368/

I suspect a weird interaction with with_lockmode that causes a query to not return rows during a lock and the exception bubbles up when it isn't supposed to.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.