← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1128605] Re: tpool implementation in sqlalchemy is wrong

 

** Changed in: oslo
       Status: Fix Committed => Fix Released

** Changed in: oslo
    Milestone: None => grizzly-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1128605

Title:
  tpool implementation in sqlalchemy is wrong

Status in OpenStack Compute (Nova):
  Fix Released
Status in Oslo - a Library of Common OpenStack Code:
  Fix Released

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1128605/+subscriptions