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:
26
quark/db/migration/alembic/versions/29265c7bcd1f_.py
Normal file
26
quark/db/migration/alembic/versions/29265c7bcd1f_.py
Normal 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')
|
||||
@@ -1 +1 @@
|
||||
4dbf83f37bc0
|
||||
29265c7bcd1f
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user