summaryrefslogtreecommitdiffstats
path: root/nova/notifications.py
diff options
context:
space:
mode:
authorBoris Pavlovic <boris@pavlovic.me>2013-03-04 23:31:20 +0400
committerBoris Pavlovic <boris@pavlovic.me>2013-03-04 23:51:26 +0400
commitbe6a2cc1670bb27334609e17f0556529f0cc9462 (patch)
tree3bdf31e0e9024898dedaadc80c6c854c77bc487f /nova/notifications.py
parentbcdbe9ba881db8b38525bfc44a182e6b210459cd (diff)
downloadnova-be6a2cc1670bb27334609e17f0556529f0cc9462.tar.gz
nova-be6a2cc1670bb27334609e17f0556529f0cc9462.tar.xz
nova-be6a2cc1670bb27334609e17f0556529f0cc9462.zip
Imporove db.sqlalchemy.api._validate_unique_server_name method
This method is called by instance_create and instance_update. If parameter CONF.osapi_compute_unqiue_server_name_scope is set to 'global' or 'project' then it has terrible performance. Algorithm was next: 1) Get all instances and all connected data (5 joinloads..) in global (or project). 2) Compare hostname with hostnames in instances (locally) Now: 1) Get only count of instances with same hostname in global (or project). 2) If count > 0 raise Exception. Change-Id: I35ea121c3f906b4fff11c38bafa2ab33200bd6b2
Diffstat (limited to 'nova/notifications.py')
0 files changed, 0 insertions, 0 deletions