]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Do not track active reservations
authorsalvatore <salv.orlando@gmail.com>
Fri, 21 Aug 2015 08:44:25 +0000 (10:44 +0200)
committerArmando Migliaccio <armamig@gmail.com>
Wed, 2 Sep 2015 01:42:14 +0000 (01:42 +0000)
commite10b008f7a2a1cb45ae5f77082f8d45b51274489
tree94f0d0a3bbeb1e35b51ee0be81c43bead2ed7ea9
parent24fde6cae2e26d6f1d912cc8b8dbacaaf523b3d7
Do not track active reservations

Reservations have a transient nature: a reservation lifespan
typically begins and ends with a single request.
Therefore tracking reserved amounts for each tenant and resource
is not nearly as efficient as tracking resource usage.
Indeed it is fairly easy to verify that the overhead for tracking
reserved amounts is much greater than the one needed for counting
active reservations for each tenant and resource.

This patch removes the logic for tracking reservations, and
replaces it with an explicit count of active reservations.

Please note that this patch does not adjust accordingly the
ResourceUsage DB model. This will be done in a separate patch with
an expand migration; this should avoid most merge conflicts before
the final patch for restoring reservation logic merges.

Related-Blueprint: better-quotas

Change-Id: Ib5e3bd61c1bc0fc8a5d612dae5c1740a8834a980
neutron/db/quota/api.py
neutron/db/quota/driver.py
neutron/quota/resource.py
neutron/tests/unit/db/quota/test_api.py
neutron/tests/unit/quota/test_resource.py