Add eventlet db_pool use for mysql

This adds the use of eventlet's db_pool module so that we can make mysql
calls without blocking the whole process.
New config options are introduced:

sql_dbpool_enable -- Enables the use of eventlet's db_pool
sql_min_pool_size -- Set the minimum number of SQL connections
sql_max_pool_size -- Set the maximum number of SQL connections
sql_idle_timeout  -- Timeout before idle sql connections are reaped

The default for sql_dbpool_enable is False for now, so there is
no forced behavior changes for those using mysql. sql_min_pool_size
is defaulted to 1 to match behavior if not using db_pool.

Fixes bug 1086173

Change-Id: Ied0aae33211585743fe955028a75c4e192a15d2f
This commit is contained in:
Gary Kotton
2012-12-10 12:39:22 +00:00
parent 2f50a0d695
commit fe82df26f0
23 changed files with 283 additions and 39 deletions

View File

@@ -274,7 +274,7 @@ class Controller(object):
# plugin raised might have been created or not in the db.
# We need a way for ensuring that if it has been created,
# it is then deleted
raise
raise ex
def create(self, request, body=None, **kwargs):
"""Creates a new instance of the requested entity"""