Reviewed: https://review.openstack.org/396942 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7c51cf976428fae5484ed44624049e1a1446b594 Submitter: Jenkins Branch: master
commit 7c51cf976428fae5484ed44624049e1a1446b594 Author: Hans Lindgren <[email protected]> Date: Sun Nov 13 15:44:39 2016 +0100 Avoid unnecessary db_calls in objects.Instance._from_db_object() During construction of an instance object from db info, a call to _from_db_object() is made. In many situations this results in one or more unnecessary db calls due to the way instance extras are handled. This occurs when the following two conditions apply; (1) the 'expected_attrs' parameter contains one of the affected instance_extras fields (see below) and (2) the corresponding value in the provided db_instance data either does not exist or else contains None. The affected instance extras fields are: - numa_topology - pci_requests - device_metadata - vcpu_model This change works around this by making use of the already defined _NO_DATA_SENTINEL object to differentiate between a None value and no value at all so that only the latter results in calling out to the db. Change-Id: Ib09f3ba50ea2ec13d9d842923449b2f7faf32ff2 Closes-Bug: #1641413 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1641413 Title: Unnecessary db traffic when constructing instance object from db info Status in OpenStack Compute (nova): Fix Released Bug description: During construction of an instance object from db info, a call to _from_db_object() is made. In many situations this results in one or more unnecessary db calls due to the way instance extras are handled. This occurs when the following two conditions apply; (1) the 'expected_attrs' parameter contains one of the affected instance_extras fields (see below) and (2) the corresponding value in the provided db_instance data either does not exist or else contains None. The affected instance extras fields are: - numa_topology - pci_requests - device_metadata - vcpu_model To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1641413/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

