)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1f5a16a3abe8c7d1a061b3d915cc1d7fabe73b65","unresolved":false,"context_lines":[{"line_number":5586,"context_line":"            # The list of instances to heal is empty so rebuild it"},{"line_number":5587,"context_line":"            LOG.debug(\u0027Rebuilding the list of instances to heal\u0027)"},{"line_number":5588,"context_line":"            db_instances \u003d objects.InstanceList.get_by_host("},{"line_number":5589,"context_line":"                context, self.host, expected_attrs\u003d[], use_slave\u003dTrue)"},{"line_number":5590,"context_line":"            for inst in db_instances:"},{"line_number":5591,"context_line":"                # We don\u0027t want to refresh the cache for instances"},{"line_number":5592,"context_line":"                # which are building or deleting so don\u0027t put them"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_29638243","line":5589,"range":{"start_line":5589,"start_character":36,"end_line":5589,"end_character":53},"updated":"2016-02-01 20:58:34.000000000","message":"I think we\u0027ll still lazy-load flavor in the case where we start with an empty list of instances to heal. But I notice we don\u0027t have any expected_attrs here, unlike at L5618, which looks like we would rather lazy-load for the first instance than join during query for all instances on the host.","commit_id":"2e96f7f2d7912f9c1b84d86065aa55a00da4b4ed"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"31a0744dedfe88b68800b563c79e0c26ab408cd6","unresolved":false,"context_lines":[{"line_number":5586,"context_line":"            # The list of instances to heal is empty so rebuild it"},{"line_number":5587,"context_line":"            LOG.debug(\u0027Rebuilding the list of instances to heal\u0027)"},{"line_number":5588,"context_line":"            db_instances \u003d objects.InstanceList.get_by_host("},{"line_number":5589,"context_line":"                context, self.host, expected_attrs\u003d[], use_slave\u003dTrue)"},{"line_number":5590,"context_line":"            for inst in db_instances:"},{"line_number":5591,"context_line":"                # We don\u0027t want to refresh the cache for instances"},{"line_number":5592,"context_line":"                # which are building or deleting so don\u0027t put them"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_7e17b554","line":5589,"range":{"start_line":5589,"start_character":36,"end_line":5589,"end_character":53},"in_reply_to":"7a5de9d1_13931aa5","updated":"2016-02-02 19:49:46.000000000","message":"Cool, we are on the same page, thanks :)","commit_id":"2e96f7f2d7912f9c1b84d86065aa55a00da4b4ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e5bf7f9be147a0d2da56d245d6732b5b17e96b67","unresolved":false,"context_lines":[{"line_number":5586,"context_line":"            # The list of instances to heal is empty so rebuild it"},{"line_number":5587,"context_line":"            LOG.debug(\u0027Rebuilding the list of instances to heal\u0027)"},{"line_number":5588,"context_line":"            db_instances \u003d objects.InstanceList.get_by_host("},{"line_number":5589,"context_line":"                context, self.host, expected_attrs\u003d[], use_slave\u003dTrue)"},{"line_number":5590,"context_line":"            for inst in db_instances:"},{"line_number":5591,"context_line":"                # We don\u0027t want to refresh the cache for instances"},{"line_number":5592,"context_line":"                # which are building or deleting so don\u0027t put them"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_63308ae9","line":5589,"range":{"start_line":5589,"start_character":36,"end_line":5589,"end_character":53},"in_reply_to":"7a5de9d1_29638243","updated":"2016-02-02 14:55:34.000000000","message":"The only reason we pull this list of instances is to build a list of uuids, which is why we don\u0027t need any expected_attrs. After we have a list, we iterate through the uuids, pulling a fresh instance each time, with the attributes populated that we expect.","commit_id":"2e96f7f2d7912f9c1b84d86065aa55a00da4b4ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"493da18fbc0ea8b4783d0080fddcab58fc84d462","unresolved":false,"context_lines":[{"line_number":5586,"context_line":"            # The list of instances to heal is empty so rebuild it"},{"line_number":5587,"context_line":"            LOG.debug(\u0027Rebuilding the list of instances to heal\u0027)"},{"line_number":5588,"context_line":"            db_instances \u003d objects.InstanceList.get_by_host("},{"line_number":5589,"context_line":"                context, self.host, expected_attrs\u003d[], use_slave\u003dTrue)"},{"line_number":5590,"context_line":"            for inst in db_instances:"},{"line_number":5591,"context_line":"                # We don\u0027t want to refresh the cache for instances"},{"line_number":5592,"context_line":"                # which are building or deleting so don\u0027t put them"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_13931aa5","line":5589,"range":{"start_line":5589,"start_character":36,"end_line":5589,"end_character":53},"in_reply_to":"7a5de9d1_63308ae9","updated":"2016-02-02 18:51:07.000000000","message":"Oh sorry, I think I just realized what you meant. Since we save the first instance out of the list to fall through to the heal for the first case, we\u0027ll have an instance with no flavor in it. That will trigger a lazy load.\n\nThat indeed will trigger one, and is what I -W\u0027ed this to go find. If we joined flavor for all those instances and then threw away all but the first, that would be super wasteful. If we didn\u0027t save the first one, we\u0027d do the lookup for it again, which would be just as wasteful.\n\nSo, I think leaving this as it is and just knowing we\u0027ll hit a lazy-load on the first one is the best optimization we\u0027re going to get at the moment, without doing something far sneakier.","commit_id":"2e96f7f2d7912f9c1b84d86065aa55a00da4b4ed"}]}
