Update migration 153 for efficiency.
Currently migration 153 inserts 10 rows per instance in the database. For new/small installations this is relatively quick, but for large installations this can take some time. This change modifies the migration to only insert records for non-deleted instances and makes bulk inserts (10 rows are inserted with each query, instead of 1 per query) for added speed. Fixes bug 1155371 Change-Id: I88a6cec2c117368fda6eefd82150106a1542027d
This commit is contained in:
		| @@ -794,10 +794,10 @@ class TestNovaMigrations(BaseMigrationTestCase, CommonTestsMixIn): | |||||||
|             ] |             ] | ||||||
|  |  | ||||||
|         fake_instances = [ |         fake_instances = [ | ||||||
|             dict(uuid='m153-uuid1', instance_type_id=10), |             dict(uuid='m153-uuid1', instance_type_id=10, deleted=0), | ||||||
|             dict(uuid='m153-uuid2', instance_type_id=11), |             dict(uuid='m153-uuid2', instance_type_id=11, deleted=0), | ||||||
|             dict(uuid='m153-uuid3', instance_type_id=12), |             dict(uuid='m153-uuid3', instance_type_id=12, deleted=0), | ||||||
|             dict(uuid='m153-uuid4', instance_type_id=13), |             dict(uuid='m153-uuid4', instance_type_id=13, deleted=0), | ||||||
|             # NOTE(danms): no use of type5 |             # NOTE(danms): no use of type5 | ||||||
|             ] |             ] | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Brian Lamar
					Brian Lamar