Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch implements 'list_instance_uuids' in the xenapi virt driver so that compute manager's '_get_instances_on_driver' can operate more efficiently. Fixes bug 1097980 The cleanup_running_deleted_instances periodic task uses the above call while context has been modified to be read_deleted='yes'. Without list_instance_uuids being implemented in xenapi, there's a fallback to querying all instances on the host. Because of read_deleted='yes', this queries all instances that have ever lived on the host. In a very busy environment where instances are repeatedly built and destroyed, one can end up with thousands of deleted instances. Now that we are storing instance_type data in system_metadata and system_metadata is joined with every instance_get, this results in 10x the number of rows being returned with sqlalchemy... the fallback doesn't perform well enough. Change-Id: I4bbfd69c9769807cec813af757665f03d9643460
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters