Comment 8 for bug 1486134

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/216640
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7da1724d446b6804c6be7a602532fbae58d9f008
Submitter: Jenkins
Branch: master

commit 7da1724d446b6804c6be7a602532fbae58d9f008
Author: Salvatore Orlando <email address hidden>
Date: Tue Aug 25 02:21:06 2015 -0700

    Improve DB operations for quota reservation

    This patch deals with the lock wait timeout and the deadlock errors
    observed under high concurrency (api_workers >= 4) with the pymysql
    driver. It includes the following changes:

    - Stop setting dirty status for resource usage when creating
      reservation, as usage of reserved resources is not tracked anymore;
    - Add a variable, increasing delay when retrying make_reservation
      upon a DBDeadlock error in order to reduce the chances of further
      collisions;
    - Enable transaction retry upon DBDeadlock errors for set_quota_usage;
    - Do not resync quota usage while making reservation. This puts a lot
      of stress on the database and is also wasteful since resource usage
      is very likely to change again once the transaction is committed;
    - Use autonested_transaction to simplify logic around when the
      nested flag should be used.

    Change-Id: I7a335f9ebea3c0d6fee6e6b757554e045a66075c
    Closes-Bug: #1486134
    Related-Blueprint: better-quotas