neutron/neutron/quota
Salvatore Orlando 7da1724d44 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
2015-09-07 02:32:51 -07:00
..
__init__.py Reservations support 2015-08-17 15:54:19 -07:00
resource.py Improve DB operations for quota reservation 2015-09-07 02:32:51 -07:00
resource_registry.py Improve DB operations for quota reservation 2015-09-07 02:32:51 -07:00