)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Iteratively generate host states from \u0027get_all_host_states\u0027"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Instead of fetching all the hosts, updating to there most accurate"},{"line_number":10,"context_line":"information and then yielding all known hosts back we can do this"},{"line_number":11,"context_line":"iteratively instead (which avoids needless computation in the case"},{"line_number":12,"context_line":"where a filtering happens early)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba15a1d1_247ab488","line":9,"range":{"start_line":9,"start_character":47,"end_line":9,"end_character":52},"updated":"2015-09-18 15:14:28.000000000","message":"nit: their","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                hosts, weight_properties)"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"    def get_all_host_states(self, context):"},{"line_number":530,"context_line":"        \"\"\"Returns a iterator of HostStates that represents all the hosts"},{"line_number":531,"context_line":"        the HostManager knows about. Also, during iteration each of the"},{"line_number":532,"context_line":"        consumable resources in HostState are populated and adjusted based on"},{"line_number":533,"context_line":"        data in the db."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_645c2c19","line":530,"range":{"start_line":530,"start_character":19,"end_line":530,"end_character":21},"updated":"2015-09-18 15:14:28.000000000","message":"nit: an","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        seen_nodes \u003d set()"},{"line_number":545,"context_line":"        partial_host_states \u003d []"},{"line_number":546,"context_line":"        for compute in compute_nodes:"},{"line_number":547,"context_line":"            service \u003d service_refs.get(compute.host)"},{"line_number":548,"context_line":"            if not service:"},{"line_number":549,"context_line":"                LOG.warning(_LW("},{"line_number":550,"context_line":"                    \"No compute service record found for host %(host)s\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_47924af7","line":547,"range":{"start_line":547,"start_character":22,"end_line":547,"end_character":52},"updated":"2015-09-18 15:14:28.000000000","message":"it\u0027d be nice to batch this in another patch","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"bb6106c5b1bae52802565c99fade0929035f4477","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        seen_nodes \u003d set()"},{"line_number":545,"context_line":"        partial_host_states \u003d []"},{"line_number":546,"context_line":"        for compute in compute_nodes:"},{"line_number":547,"context_line":"            service \u003d service_refs.get(compute.host)"},{"line_number":548,"context_line":"            if not service:"},{"line_number":549,"context_line":"                LOG.warning(_LW("},{"line_number":550,"context_line":"                    \"No compute service record found for host %(host)s\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_637150e0","line":547,"in_reply_to":"ba15a1d1_325420c9","updated":"2015-09-21 12:42:07.000000000","message":"Sorry, I mean that we\u0027re running this query once per compute node. It\u0027d be better to request service refs for all compute nodes at once, as a dict, then iterate through that dict. Separate patch though.","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"60c10ae5b44c63921dd065f84dbff3cb7c6db337","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        seen_nodes \u003d set()"},{"line_number":545,"context_line":"        partial_host_states \u003d []"},{"line_number":546,"context_line":"        for compute in compute_nodes:"},{"line_number":547,"context_line":"            service \u003d service_refs.get(compute.host)"},{"line_number":548,"context_line":"            if not service:"},{"line_number":549,"context_line":"                LOG.warning(_LW("},{"line_number":550,"context_line":"                    \"No compute service record found for host %(host)s\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_325420c9","line":547,"in_reply_to":"ba15a1d1_47924af7","updated":"2015-09-19 00:35:38.000000000","message":"Depends on what u mean by batch.","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":551,"context_line":"                    {\u0027host\u0027: compute.host})"},{"line_number":552,"context_line":"                continue"},{"line_number":553,"context_line":"            state_key \u003d (compute.host, compute.hypervisor_hostname)"},{"line_number":554,"context_line":"            # It\u0027s ok if this is none at this point, it will be created"},{"line_number":555,"context_line":"            # in the iteration loop below."},{"line_number":556,"context_line":"            host_state \u003d self.host_state_map.get(state_key)"},{"line_number":557,"context_line":"            partial_host_states.append((service, compute, host_state))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_872942e8","line":554,"range":{"start_line":554,"start_character":25,"end_line":554,"end_character":29},"updated":"2015-09-18 15:14:28.000000000","message":"nit: s/this/the host_state/","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        for service, compute, host_state in partial_host_states:"},{"line_number":570,"context_line":"            host \u003d compute.host"},{"line_number":571,"context_line":"            node \u003d compute.hypervisor_hostname"},{"line_number":572,"context_line":"            if not host_state:"},{"line_number":573,"context_line":"                brand_new \u003d True"},{"line_number":574,"context_line":"                host_state \u003d self.host_state_cls(host, node, compute\u003dcompute)"},{"line_number":575,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_32e67244","line":572,"range":{"start_line":572,"start_character":15,"end_line":572,"end_character":18},"updated":"2015-09-18 15:14:28.000000000","message":"I\u0027d prefer to have \"if host_state\" and switch the bodies, easier to read. This is how it was originally, not sure why you changed it.","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"60c10ae5b44c63921dd065f84dbff3cb7c6db337","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        for service, compute, host_state in partial_host_states:"},{"line_number":570,"context_line":"            host \u003d compute.host"},{"line_number":571,"context_line":"            node \u003d compute.hypervisor_hostname"},{"line_number":572,"context_line":"            if not host_state:"},{"line_number":573,"context_line":"                brand_new \u003d True"},{"line_number":574,"context_line":"                host_state \u003d self.host_state_cls(host, node, compute\u003dcompute)"},{"line_number":575,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_525194d7","line":572,"in_reply_to":"ba15a1d1_32e67244","updated":"2015-09-19 00:35:38.000000000","message":"Done","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            host_state.update_service(dict(service))"},{"line_number":585,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":586,"context_line":"            if brand_new:"},{"line_number":587,"context_line":"                self.host_state_map[(host, node)] \u003d host_state"},{"line_number":588,"context_line":"            yield host_state"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _add_instance_info(self, context, compute, host_state):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_12d6ce4e","line":587,"updated":"2015-09-18 15:14:28.000000000","message":"why\u0027d you move this out of the if?","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"60c10ae5b44c63921dd065f84dbff3cb7c6db337","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            host_state.update_service(dict(service))"},{"line_number":585,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":586,"context_line":"            if brand_new:"},{"line_number":587,"context_line":"                self.host_state_map[(host, node)] \u003d host_state"},{"line_number":588,"context_line":"            yield host_state"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _add_instance_info(self, context, compute, host_state):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_724a9829","line":587,"in_reply_to":"ba15a1d1_12d6ce4e","updated":"2015-09-19 00:35:38.000000000","message":"Delay updating the \u0027host_state_map\u0027 until all the auxilary information has been fetched, in-case it somehow dies in doing the other updates then it isn\u0027t saved...","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"48b844725140f7f2188cc093278633c65299576d","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            host_state.update_service(dict(service))"},{"line_number":585,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":586,"context_line":"            if brand_new:"},{"line_number":587,"context_line":"                self.host_state_map[(host, node)] \u003d host_state"},{"line_number":588,"context_line":"            yield host_state"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _add_instance_info(self, context, compute, host_state):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_b6ec5df4","line":587,"in_reply_to":"ba15a1d1_2ec1ff80","updated":"2015-09-22 03:54:56.000000000","message":"Define harmful :-P","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"ca0c089e827b7c84e33d9cedcfa359a355a3b0f6","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            host_state.update_service(dict(service))"},{"line_number":585,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":586,"context_line":"            if brand_new:"},{"line_number":587,"context_line":"                self.host_state_map[(host, node)] \u003d host_state"},{"line_number":588,"context_line":"            yield host_state"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _add_instance_info(self, context, compute, host_state):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_981156b2","line":587,"in_reply_to":"ba15a1d1_47d666f2","updated":"2015-10-02 15:51:24.000000000","message":"Gotcha, then no I don\u0027t think its harmful (at least for my understanding of this code).","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"bb6106c5b1bae52802565c99fade0929035f4477","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            host_state.update_service(dict(service))"},{"line_number":585,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":586,"context_line":"            if brand_new:"},{"line_number":587,"context_line":"                self.host_state_map[(host, node)] \u003d host_state"},{"line_number":588,"context_line":"            yield host_state"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _add_instance_info(self, context, compute, host_state):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_2ec1ff80","line":587,"in_reply_to":"ba15a1d1_724a9829","updated":"2015-09-21 12:42:07.000000000","message":"OK, makes sense. Is it harmful to always update the map?","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"c4761159b2a8ff4d3ffe1a6f944a47cdd8a98e9f","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            host_state.update_service(dict(service))"},{"line_number":585,"context_line":"            self._add_instance_info(context, compute, host_state)"},{"line_number":586,"context_line":"            if brand_new:"},{"line_number":587,"context_line":"                self.host_state_map[(host, node)] \u003d host_state"},{"line_number":588,"context_line":"            yield host_state"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _add_instance_info(self, context, compute, host_state):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_47d666f2","line":587,"in_reply_to":"ba15a1d1_b6ec5df4","updated":"2015-09-22 10:04:42.000000000","message":"Let me rephrase, \"Please change this unless you can justify not doing so\". You\u0027ve introduced an extra Boolean, I\u0027m trying to help you get rid of that unnecessary complexity.","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"}],"nova/test.py":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"7c13a1ccd206c04288abc70bc255fed1a7f1aecc","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    nested \u003d contextlib.nested"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def deplete_iterator(it):"},{"line_number":76,"context_line":"    \"\"\"Consumes all an iterators values.\"\"\""},{"line_number":77,"context_line":"    while True:"},{"line_number":78,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_b20da2e9","line":75,"updated":"2015-09-18 15:14:28.000000000","message":"this seems pretty weird, an easy way to do this is list(it)","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"0f68434d1981928aa9e192c8287c754514934408","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    nested \u003d contextlib.nested"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def deplete_iterator(it):"},{"line_number":76,"context_line":"    \"\"\"Consumes all an iterators values.\"\"\""},{"line_number":77,"context_line":"    while True:"},{"line_number":78,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_16b429f0","line":75,"in_reply_to":"ba15a1d1_b20da2e9","updated":"2015-09-22 03:55:23.000000000","message":"But that creates a temporary list, this doesn\u0027t.","commit_id":"2ef7bb445241f745e63a91c3620499d9930f097f"}]}
