Synchronize changes with perf testing

NCP-1564

* Adds a new index for quark_ip_addresses that helps with reallocation
* Removes the semaphore decorator from select_subnet
This commit is contained in:
Matt Dietz
2015-06-20 21:49:43 -05:00
parent f4e55b8704
commit 813a3a30de
3 changed files with 27 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
"""empty message
Revision ID: 29265c7bcd1f
Revises: 4dbf83f37bc0
Create Date: 2015-06-18 14:27:18.571918
"""
# revision identifiers, used by Alembic.
revision = '29265c7bcd1f'
down_revision = '4dbf83f37bc0'
from alembic import op
def upgrade():
op.create_index(op.f('ix_quark_reallocate_ip_addresses'),
'quark_ip_addresses',
["network_id", "tenant_id", "version", "subnet_id",
"deallocated_at"],
unique=False)
def downgrade():
op.drop_index(op.f('ix_quark_reallocate_ip_addresses'),
table_name='quark_ip_addresses')

View File

@@ -1 +1 @@
4dbf83f37bc0
29265c7bcd1f

View File

@@ -816,10 +816,6 @@ class QuarkIpam(object):
return False
return True
# RM6180(roaet):
# - removed session.begin due to deadlocks
# - fix off-by-one error and overflow
@synchronized(named("select_subnet"))
def select_subnet(self, context, net_id, ip_address, segment_id,
subnet_ids=None, **filters):
LOG.info("Selecting subnet(s) - (Step 2 of 3) [{0}]".format(