tpool implementation in sqlalchemy is wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Chris Behrens | ||
oslo-incubator |
Fix Released
|
Undecided
|
Chris Behrens | ||
Grizzly |
Fix Released
|
Undecided
|
Chris Behrens |
Bug Description
The eventlet tpool implementation wraps every SQL query individually such that deadlock can occur. When using transactions (and autocommit is False anyway, such that we're always using transactions), all SQL queries must submit a 'COMMIT' query to end the transaction. It's possible that there are no threads available to submit the 'COMMIT' query because they are all blocking in SQL queries that grab a lock.
Ie, imagine the thread pool size is 20. Imagine that you have 20 queries in progress that grab the same lock within mysql... and all are in a state where none of them have done a COMMIT yet. You now have 20 queries stuck waiting for the lock timeout.
Eventually you'll get a 'Lock wait timeout' error from mysql.
When we implement tpool, we'll need to wrap each DB API call as a whole.
Changed in nova: | |
milestone: | none → grizzly-3 |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | none → grizzly-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-3 → 2013.1 |
Fix proposed to branch: master /review. openstack. org/22158
Review: https:/