)]}'
{"nova/scheduler/host_manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bf6699123d807aa2cf7b8795c3be8edc6367bb9b","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                         \"from scheduler\"), {\u0027host\u0027: host, \u0027node\u0027: node})"},{"line_number":716,"context_line":"            del self.host_state_map[state_key]"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        return (self.host_state_map[host] for host in seen_nodes)"},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    def _get_aggregates_info(self, host):"},{"line_number":721,"context_line":"        return [self.aggs_by_id[agg_id] for agg_id in"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf8cb3f7_0f24d10c","side":"PARENT","line":718,"range":{"start_line":718,"start_character":15,"end_line":718,"end_character":65},"updated":"2017-12-20 16:28:19.000000000","message":"Rather than lose the generator expression, why not just check if host is in self.host_state_map before trying to get it? Or does it not matter because if we\u0027re already taking the time to build the seen_nodes set, using the generator doesn\u0027t really buy us anything, except maybe sending a much bigger object over to the call in memory? Thinking a public cloud with 10K nodes.","commit_id":"2506afda54d2ccbac0ec6083362bc9b1f789d1f3"}],"nova/tests/unit/scheduler/test_host_manager.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"16024d6807ebdddbb52e91c6cfbca47ea08baeaf","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        hosts \u003d self.host_manager.get_all_host_states(context)"},{"line_number":1027,"context_line":"        # get_all_host_states returns a generator so convert the values into"},{"line_number":1028,"context_line":"        # an iterator"},{"line_number":1029,"context_line":"        host_states1 \u003d iter(hosts)"},{"line_number":1030,"context_line":"        host_states_map \u003d self.host_manager.host_state_map"},{"line_number":1031,"context_line":"        self.assertEqual(len(host_states_map), 4)"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_3ab551ef","line":1029,"range":{"start_line":1029,"start_character":8,"end_line":1029,"end_character":34},"updated":"2017-12-20 16:55:49.000000000","message":"Not strictly required, as we\u0027re already returning an iterator. Doesn\u0027t hurt, though.","commit_id":"d72b33b986525a9b2c7aa08b609ae386de1d0e89"}]}
