Lock wait of mysql blocks all eventlet thread

Bug #1086173 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Gary Kotton

Bug Description

I faced the problem with mysql transaction and eventlet.

Quantum using transaction support of sqlalchemy
Quantum also using eventlet for RPC

Let's say there are api request A and B.
Sql request of A will lock B's sql request.
so B's sql request will wait the A's transaction.

On the other hand, we are using evenetlet.
Since we are using mysql c client, the API request may block eventlet
thread.

so when B start wait sql lock, it blocks all eventlet thread including api request A until lock timeout.

This bp for nova looks like solve the quantum one also.
https://blueprints.launchpad.net/nova/+spec/non-blocking-db

Nachi Ueno (nati-ueno)
Changed in quantum:
milestone: none → grizzly-2
importance: Undecided → High
Changed in quantum:
assignee: nobody → yong sheng gong (gongysh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/17779

Changed in quantum:
assignee: yong sheng gong (gongysh) → Gary Kotton (garyk)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/17779
Committed: http://github.com/openstack/quantum/commit/7b5f6fd6ae0722f49b563f2f3f293a34d8f632d9
Submitter: Jenkins
Branch: master

commit 7b5f6fd6ae0722f49b563f2f3f293a34d8f632d9
Author: Gary Kotton <email address hidden>
Date: Mon Dec 10 12:39:22 2012 +0000

    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

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.