)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"e9d529bd7dc23be35efc7c79bdbb8cb783a40c78","unresolved":false,"context_lines":[{"line_number":24,"context_line":"events."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ie2b089a2a2d0cd6bb45d0f11ab2a8c77ff1a8fb1"},{"line_number":27,"context_line":"Implements: blueprint nova-optionally-disable-some-events"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3aaa91ec_6daf03e4","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":10},"updated":"2016-06-21 22:43:53.000000000","message":"Should this change to Partially-Implements?","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"87986bc3eb608f7f995d3985b9669c59e73c7191","unresolved":false,"context_lines":[{"line_number":24,"context_line":"events."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ie2b089a2a2d0cd6bb45d0f11ab2a8c77ff1a8fb1"},{"line_number":27,"context_line":"Implements: blueprint nova-optionally-disable-some-events"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3aaa91ec_7848dccc","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":10},"in_reply_to":"3aaa91ec_6daf03e4","updated":"2016-06-23 22:04:13.000000000","message":"No.. it was only intended to optimize cases we already cover. Other events like reboot etc aren\u0027t properly captured yet, need to be a spearate ticket","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"}],"doc/source/plugins/nova.rst":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b47e095cea434c6adddd9611d885e17725eb9805","unresolved":false,"context_lines":[{"line_number":151,"context_line":"initial nova request prior to the scheduler, one when the"},{"line_number":152,"context_line":"``instance.create.start`` notification is received, one when networking is"},{"line_number":153,"context_line":"established and one after the instance has booted and run any init scripts."},{"line_number":154,"context_line":"Other notifications during boot will update only the server status."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"0.2.0.0 (Mitaka)"},{"line_number":157,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1aa78d24_b7666327","line":154,"updated":"2016-07-08 01:51:47.000000000","message":"I only got 3 hits for creation:\n1. compute.instance.update\n2. compute.instance.create.start\n3. compute.instance.create.end\n\nam i missing the networking one ?","commit_id":"0e4c767e1f7fc79d812952cf6a1db95e686517e7"}],"searchlight/elasticsearch/plugins/base.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"0f405a72b778fd7baac85c0298ac0b21421b0244","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        else:"},{"line_number":623,"context_line":"            date_fields_str \u003d \u0027, \u0027.join(date_fields)"},{"line_number":624,"context_line":"            msg \u003d (\u0027Failed to build elasticsearch version; none of %s \u0027"},{"line_number":625,"context_line":"                   \u0027found in payload: %s\u0027 % (date_fields_str, payload))"},{"line_number":626,"context_line":"            raise exception.SearchlightException(message\u003dmsg)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        updated_obj \u003d timeutils.parse_isotime(updated)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_733121ed","line":625,"updated":"2016-06-17 16:35:54.000000000","message":"This isn\u0027t your log message so not -1 over this, but this log message really should be done in accordance with the internationalization guidelines:\n\nhttps://review.openstack.org/#/c/322370/\n\ne.g. %(payload)s  ... % {\u0027payload\u0027: payload}","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"4524b872834f05b8c98a5a13032728dcc90ab661","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        else:"},{"line_number":623,"context_line":"            date_fields_str \u003d \u0027, \u0027.join(date_fields)"},{"line_number":624,"context_line":"            msg \u003d (\u0027Failed to build elasticsearch version; none of %s \u0027"},{"line_number":625,"context_line":"                   \u0027found in payload: %s\u0027 % (date_fields_str, payload))"},{"line_number":626,"context_line":"            raise exception.SearchlightException(message\u003dmsg)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        updated_obj \u003d timeutils.parse_isotime(updated)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_d383b501","line":625,"in_reply_to":"7aa08908_733121ed","updated":"2016-06-17 16:36:38.000000000","message":"Wrong copy in buffer, meant this link: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-translated-messages","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        else:"},{"line_number":623,"context_line":"            date_fields_str \u003d \u0027, \u0027.join(date_fields)"},{"line_number":624,"context_line":"            msg \u003d (\u0027Failed to build elasticsearch version; none of %s \u0027"},{"line_number":625,"context_line":"                   \u0027found in payload: %s\u0027 % (date_fields_str, payload))"},{"line_number":626,"context_line":"            raise exception.SearchlightException(message\u003dmsg)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        updated_obj \u003d timeutils.parse_isotime(updated)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_9d5e56e7","line":625,"in_reply_to":"7aa08908_d383b501","updated":"2016-06-17 22:44:17.000000000","message":"I\u0027ll change the formatting but i don\u0027t think any of our exceptions are going through the translation framework so maybe best as a separate bug.","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"}],"searchlight/elasticsearch/plugins/nova/notification_handler.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    @classmethod"},{"line_number":41,"context_line":"    def _get_notification_exchanges(cls):"},{"line_number":42,"context_line":"        return [\u0027nova\u0027, \u0027neutron\u0027]"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def get_event_handlers(self):"},{"line_number":45,"context_line":"        return {"},{"line_number":46,"context_line":"            # compute.instance.update seems to be the event set as a"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_63f76fd3","line":43,"updated":"2016-05-17 00:05:34.000000000","message":"Let\u0027s put some documentation on the expected order of events that this code covers.  e.g.\n\nInstance Launch:\n\nstate: task state: action\nscheduling: scheduling: index from API (why not update?)\nscheduling: none: ignore (proposing)","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def index_from_update(self, payload, timestamp):"},{"line_number":65,"context_line":"        \"\"\"Determine whether or not to process a full update\"\"\""},{"line_number":66,"context_line":"        state \u003d payload.get(\u0027state\u0027, None)"},{"line_number":67,"context_line":"        new_task_state \u003d payload.get(\u0027new_task_state\u0027, None)"},{"line_number":68,"context_line":"        old_task_state \u003d payload.get(\u0027old_task_state\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_833b73d0","line":65,"updated":"2016-05-17 00:05:34.000000000","message":"Naming this \"new_state\" would help a bit with readability I think.","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        new_task_state \u003d payload.get(\u0027new_task_state\u0027, None)"},{"line_number":68,"context_line":"        old_task_state \u003d payload.get(\u0027old_task_state\u0027, None)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # Default to true unless we decide otherwise"},{"line_number":71,"context_line":"        update_previous_state \u003d None"},{"line_number":72,"context_line":"        if state \u003d\u003d \u0027building\u0027:"},{"line_number":73,"context_line":"            if old_task_state \u003d\u003d \u0027scheduling\u0027 and new_task_state is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_8a3b88d0","line":70,"updated":"2016-05-17 00:05:34.000000000","message":"# Default to \"Update from API\" unless we decide otherwise.","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        old_task_state \u003d payload.get(\u0027old_task_state\u0027, None)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # Default to true unless we decide otherwise"},{"line_number":71,"context_line":"        update_previous_state \u003d None"},{"line_number":72,"context_line":"        if state \u003d\u003d \u0027building\u0027:"},{"line_number":73,"context_line":"            if old_task_state \u003d\u003d \u0027scheduling\u0027 and new_task_state is None:"},{"line_number":74,"context_line":"                # This update arrives after scheduling"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_4ada404c","line":71,"updated":"2016-05-17 00:05:34.000000000","message":"In all of the below, i think it\u0027d make sense to set \u0027state\u0027: state rather than repeating the string literal of \u0027building\u0027 everywhere.\n\nIn addition, it might make sense from an error prevention standpoint to make \"update_previous_state\" its own class or a factory function that returns this object with defined keyword args rather that redefining the object everywhere with string literals.","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # and indicates the end of the init sequence"},{"line_number":93,"context_line":"            update_previous_state \u003d {"},{"line_number":94,"context_line":"                \u0027state\u0027: \u0027building\u0027, \u0027new_task_state\u0027: \u0027spawning\u0027"},{"line_number":95,"context_line":"            }"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if not update_previous_state:"},{"line_number":98,"context_line":"            self.index_from_api(payload, timestamp)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_ad99467b","line":95,"updated":"2016-05-17 00:05:34.000000000","message":"Delete also results in an index update notification calls which do an API hit. I see 4 total notifications happen. Seems like we should handle those as part of this BP (maybe as a follow on patch though?)","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            LOG.debug(\"Skipping partial state update for %s; functionality \""},{"line_number":104,"context_line":"                      \"is disabled\" % payload[\u0027instance_id\u0027])"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def _partial_state_update(self, payload, timestamp, matching_conditions):"},{"line_number":107,"context_line":"        \"\"\"Issue a partial (scripted) document update that will only affect"},{"line_number":108,"context_line":"        state and task_state fields."},{"line_number":109,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_43a22bfd","line":106,"updated":"2016-05-17 00:05:34.000000000","message":"timestamp is not used\ni think expected_previous_state would allow easier mental correlation to the calling function.","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            self._state_fields[k]: payload[k]"},{"line_number":115,"context_line":"            for k in self._state_fields if k in payload"},{"line_number":116,"context_line":"        }"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if state_field_values:"},{"line_number":119,"context_line":"            # Run a partial document update. Don\u0027t want to use groovy scripting"},{"line_number":120,"context_line":"            # because there\u0027s a high chance it\u0027ll be disabled; instead, will"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_8321b34f","line":117,"updated":"2016-05-17 00:05:34.000000000","message":"This whole section should go to a function like _instance_create_states or something like that.","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d4eefa158babb172e3a25fde0fcbe0d598f69efa","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    self.index_helper.update_document("},{"line_number":144,"context_line":"                        state_field_values, instance_id,"},{"line_number":145,"context_line":"                        update_as_script\u003dFalse,"},{"line_number":146,"context_line":"                        expected_version\u003dcurrent_version)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def index_from_api(self, payload, timestamp):"},{"line_number":149,"context_line":"        \"\"\"Index from the nova API\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_4a06c01c","line":146,"updated":"2016-05-17 00:05:34.000000000","message":"if you put one input var per line above, would be **slightly** easier to read.","commit_id":"a614985b1262a8bd28a7e371bd96c81de34833da"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"80d9373b1617af75bc4e493b682e34c0dd86651c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            \u0027compute.instance.create.start\u0027: self.index_from_api,"},{"line_number":54,"context_line":"            \u0027compute.instance.power_on.end\u0027: self.index_from_api,"},{"line_number":55,"context_line":"            \u0027compute.instance.power_off.end\u0027: self.index_from_api,"},{"line_number":56,"context_line":"            # shutdown.start also covers delete.start"},{"line_number":57,"context_line":"            \u0027compute.instance.shutdown.start\u0027: self.index_from_api,"},{"line_number":58,"context_line":"            \u0027compute.instance.shutdown.end\u0027: self.index_from_api,"},{"line_number":59,"context_line":"            \u0027compute.instance.delete.end\u0027: self.delete,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_093fccb4","line":56,"updated":"2016-06-17 18:26:03.000000000","message":"just wonder if we could also index from update the shutdown start event at least.\n\ni observed the following when debugging (which introduced unnatural latency).\n\nClick delete:\n\nGet shutdown start event (hit api -\u003e 404 on api and we delete)\nGet deleting event (index from update -\u003e ignored)\nGet shutdown end event (hit api --\u003e 404 sometimes)\nGet instance update event (-\u003e index from update ignored)\nGet instance delete event (-\u003e delete)","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            \u0027compute.instance.create.start\u0027: self.index_from_api,"},{"line_number":54,"context_line":"            \u0027compute.instance.power_on.end\u0027: self.index_from_api,"},{"line_number":55,"context_line":"            \u0027compute.instance.power_off.end\u0027: self.index_from_api,"},{"line_number":56,"context_line":"            # shutdown.start also covers delete.start"},{"line_number":57,"context_line":"            \u0027compute.instance.shutdown.start\u0027: self.index_from_api,"},{"line_number":58,"context_line":"            \u0027compute.instance.shutdown.end\u0027: self.index_from_api,"},{"line_number":59,"context_line":"            \u0027compute.instance.delete.end\u0027: self.delete,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_1c270164","line":56,"in_reply_to":"7aa08908_093fccb4","updated":"2016-06-17 22:44:17.000000000","message":"There should be an update event that\u0027s now not ignored at the beginning of deletion","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"80d9373b1617af75bc4e493b682e34c0dd86651c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def index_from_update(self, payload, timestamp):"},{"line_number":71,"context_line":"        \"\"\"Determine whether or not to process a full update. The updates, and"},{"line_number":72,"context_line":"        how they are processed, are (assume state\u003d\u003dbuilding unless noted):"},{"line_number":73,"context_line":"         * new_task_state \u003d\u003d old_task_state \u003d\u003d scheduling - full index"},{"line_number":74,"context_line":"         * new_task_state \u003d\u003d None, old_task_state \u003d\u003d scheduling - ignore"},{"line_number":75,"context_line":"         * new_task_state \u003d\u003d old_task_state \u003d\u003d None - ignore"},{"line_number":76,"context_line":"         * new_task_state \u003d\u003d networking - state update"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_c99ae461","line":73,"range":{"start_line":73,"start_character":58,"end_line":73,"end_character":59},"updated":"2016-06-17 18:26:03.000000000","message":"if you made the dashes (-) to be an arrow (--\u003e) it would make this a bit easier to read. I was at first stupidly trying to figure out if it was a minus sign.","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def index_from_update(self, payload, timestamp):"},{"line_number":71,"context_line":"        \"\"\"Determine whether or not to process a full update. The updates, and"},{"line_number":72,"context_line":"        how they are processed, are (assume state\u003d\u003dbuilding unless noted):"},{"line_number":73,"context_line":"         * new_task_state \u003d\u003d old_task_state \u003d\u003d scheduling - full index"},{"line_number":74,"context_line":"         * new_task_state \u003d\u003d None, old_task_state \u003d\u003d scheduling - ignore"},{"line_number":75,"context_line":"         * new_task_state \u003d\u003d old_task_state \u003d\u003d None - ignore"},{"line_number":76,"context_line":"         * new_task_state \u003d\u003d networking - state update"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_1c10a1ff","line":73,"range":{"start_line":73,"start_character":58,"end_line":73,"end_character":59},"in_reply_to":"7aa08908_c99ae461","updated":"2016-06-17 22:44:17.000000000","message":"Done","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"5b609a65339fb96f0406e844a0ab08075b0d5475","unresolved":false,"context_lines":[{"line_number":76,"context_line":"         * new_task_state \u003d\u003d networking - state update"},{"line_number":77,"context_line":"         * new_task_state \u003d\u003d block_device_mapping - state update"},{"line_number":78,"context_line":"         * new_task_state \u003d spawning - state update"},{"line_number":79,"context_line":"         * state \u003d\u003d active, old_task_state \u003d\u003d spawning - ignore"},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        new_state \u003d payload.get(\u0027state\u0027, None)"},{"line_number":82,"context_line":"        new_task_state \u003d payload.get(\u0027new_task_state\u0027, None)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_fb719478","line":79,"updated":"2016-06-16 23:06:07.000000000","message":"Add a comment about the delete states being ignored (new_state \u003d\u003d deleted and old_task_state \u003d deleting).","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":76,"context_line":"         * new_task_state \u003d\u003d networking - state update"},{"line_number":77,"context_line":"         * new_task_state \u003d\u003d block_device_mapping - state update"},{"line_number":78,"context_line":"         * new_task_state \u003d spawning - state update"},{"line_number":79,"context_line":"         * state \u003d\u003d active, old_task_state \u003d\u003d spawning - ignore"},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        new_state \u003d payload.get(\u0027state\u0027, None)"},{"line_number":82,"context_line":"        new_task_state \u003d payload.get(\u0027new_task_state\u0027, None)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_7c20c549","line":79,"in_reply_to":"7aa08908_fb719478","updated":"2016-06-17 22:44:17.000000000","message":"Got rid of the special case","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"80d9373b1617af75bc4e493b682e34c0dd86651c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        elif new_state \u003d\u003d \u0027deleted\u0027 or new_task_state \u003d\u003d \u0027deleting\u0027:"},{"line_number":114,"context_line":"            # Ignore all updates during delete; all the time spent during"},{"line_number":115,"context_line":"            # delete is spent shutting down the instance, and we listen to"},{"line_number":116,"context_line":"            # shutdown.start/shutdown.end as well as delete.end"},{"line_number":117,"context_line":"            ignore_update \u003d True"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if ignore_update:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_27690fbf","line":116,"updated":"2016-06-17 18:26:03.000000000","message":"Here are some other candidates for partial update rather than hitting API. Basically the \"start\" of a state change (I can practically hear you screaming from here):\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027pausing\u0027\nold_task_state \u003d {unicode} u\u0027pausing\u0027\n\nnew_state \u003d {unicode} u\u0027paused\u0027\nnew_task_state \u003d {unicode} u\u0027unpausing\u0027\nold_task_state \u003d {unicode} u\u0027unpausing\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027suspending\u0027\nold_task_state \u003d {unicode} u\u0027suspending\u0027\n\nnew_state \u003d {unicode} u\u0027suspended\u0027\nnew_task_state \u003d {unicode} u\u0027resuming\u0027\nold_task_state \u003d {unicode} u\u0027resuming\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027shelving\u0027\nold_task_state \u003d {unicode} u\u0027shelving\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027shelving_image_pending_upload\u0027\nold_task_state \u003d {unicode} u\u0027shelving\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027shelving_image_uploading\u0027\nold_task_state \u003d {unicode} u\u0027shelving_image_pending_upload\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027shelving_image_pending_upload\u0027\nold_task_state \u003d {unicode} u\u0027shelving_image_uploading\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027shelving_image_uploading\u0027\nold_task_state \u003d {unicode} u\u0027shelving_image_pending_upload\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027shelving_image_uploading\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027powering-off\u0027\nold_task_state \u003d {unicode} u\u0027powering-off\u0027\n\nnew_state \u003d {unicode} u\u0027stopped\u0027\nnew_task_state \u003d {unicode} u\u0027powering-on\u0027\nold_task_state \u003d {unicode} u\u0027powering-on\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027rebooting\u0027\nold_task_state \u003d {unicode} u\u0027rebooting\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027reboot_pending\u0027\nold_task_state \u003d {unicode} u\u0027rebooting\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {unicode} u\u0027reboot_started\u0027\nold_task_state \u003d {unicode} u\u0027reboot_pending\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027reboot_started\u0027\n\n**********************\u0027\n\nNO CHANGE:   \n\nThe \"end\" of these state changes maybe should still be from API (no change):\n\nnew_state \u003d {unicode} u\u0027paused\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027pausing\u0027\n\nnew_state \u003d {unicode} u\u0027paused\u0027\nnew_task_state \u003d {unicode} u\u0027unpausing\u0027\nold_task_state \u003d {unicode} u\u0027unpausing\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027unpausing\u0027\n\nnew_state \u003d {unicode} u\u0027suspended\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027suspending\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027resuming\u0027\n\nnew_state \u003d {unicode} u\u0027stopped\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027powering-off\u0027\n\nnew_state \u003d {unicode} u\u0027active\u0027\nnew_task_state \u003d {NoneType} None\nold_task_state \u003d {unicode} u\u0027powering-on\u0027","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        elif new_state \u003d\u003d \u0027deleted\u0027 or new_task_state \u003d\u003d \u0027deleting\u0027:"},{"line_number":114,"context_line":"            # Ignore all updates during delete; all the time spent during"},{"line_number":115,"context_line":"            # delete is spent shutting down the instance, and we listen to"},{"line_number":116,"context_line":"            # shutdown.start/shutdown.end as well as delete.end"},{"line_number":117,"context_line":"            ignore_update \u003d True"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if ignore_update:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_5de22ea1","line":116,"in_reply_to":"7aa08908_27690fbf","updated":"2016-06-17 22:44:17.000000000","message":"Hee hee. Ok, will see if i can wrangle these into something other than a giant if..then..else, but yeah, all of the \u0027-ing\u0027 power transitions are probably ok to optimize out.\n\nFor pause, for instance, we get pause.start, update.start, update.end, pause.stop so it seems reasonable to treat pause.stop as a full update and the update as a state change. This pattern appears to be repeated for stop/start (power-off/power-on) and suspend.\n\nShelve is more complicated, and i think maybe should be a separate patch. It does a load of updates to nova and glance.\n\nReboot similarly i think maybe a separate patch since it\u0027s complicated and starting to overstep the bounds of this patch","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"5b609a65339fb96f0406e844a0ab08075b0d5475","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                      \"is disabled\", payload[\u0027instance_id\u0027])"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _partial_state_update(self, payload, update_if_state_matches):"},{"line_number":131,"context_line":"        \"\"\"Issue a partial (scripted) document update that will only affect"},{"line_number":132,"context_line":"        state and task_state fields."},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        instance_id \u003d payload[\u0027instance_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_dbd7784d","line":131,"updated":"2016-06-16 23:06:07.000000000","message":"It looks like we aren\u0027t using scripting below.","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                      \"is disabled\", payload[\u0027instance_id\u0027])"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _partial_state_update(self, payload, update_if_state_matches):"},{"line_number":131,"context_line":"        \"\"\"Issue a partial (scripted) document update that will only affect"},{"line_number":132,"context_line":"        state and task_state fields."},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        instance_id \u003d payload[\u0027instance_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_dd229e53","line":131,"in_reply_to":"7aa08908_dbd7784d","updated":"2016-06-17 22:44:17.000000000","message":"Done","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"80d9373b1617af75bc4e493b682e34c0dd86651c","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                        expected_version\u003dcurrent_version)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def index_from_api(self, payload, timestamp):"},{"line_number":181,"context_line":"        \"\"\"Index from the nova API\"\"\""},{"line_number":182,"context_line":"        instance_id \u003d payload[\u0027instance_id\u0027]"},{"line_number":183,"context_line":"        LOG.debug(\"Updating nova server information for %s\", instance_id)"},{"line_number":184,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_0cf7dad3","line":181,"updated":"2016-06-17 18:26:03.000000000","message":"So, because my debugging is much slower than the notifications flow in, I found another possible optimization here.  Basically, sometimes we start processing a notification after an update call has already hit the API and gotten more recent information than the current notification. This may not happen often, but my thought is that if we checked the ES stored updated_at field to see if our stored version has an updated_at the same or later than the incoming notification, could we avoid a callback?  The only question have is if there is enough precision in the updated at to do this properly.","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8db02e7eff4142ec2740be0aecdaecbf8b56bcf4","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                        expected_version\u003dcurrent_version)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def index_from_api(self, payload, timestamp):"},{"line_number":181,"context_line":"        \"\"\"Index from the nova API\"\"\""},{"line_number":182,"context_line":"        instance_id \u003d payload[\u0027instance_id\u0027]"},{"line_number":183,"context_line":"        LOG.debug(\"Updating nova server information for %s\", instance_id)"},{"line_number":184,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_9da136ac","line":181,"in_reply_to":"7aa08908_0cf7dad3","updated":"2016-06-17 22:44:17.000000000","message":"updated_at is only accurate to the second, so i don\u0027t think we should rely on it. The more conditionals we have the more open to subtle occasional errors, so i think unless we find that we\u0027re still doing too much i\u0027d leave it like this for now","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"1711cbdb405bf8fd1edfcbfb63a070afc867384e","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                        expected_version\u003dcurrent_version)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def index_from_api(self, payload, timestamp):"},{"line_number":181,"context_line":"        \"\"\"Index from the nova API\"\"\""},{"line_number":182,"context_line":"        instance_id \u003d payload[\u0027instance_id\u0027]"},{"line_number":183,"context_line":"        LOG.debug(\"Updating nova server information for %s\", instance_id)"},{"line_number":184,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_dc99f920","line":181,"in_reply_to":"7aa08908_9da136ac","updated":"2016-06-17 22:59:12.000000000","message":"Okay, that\u0027s what I figured, but wanted to mention.","commit_id":"0b74102f188e727d107b7c1ee4e56445f3c523d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"e9d529bd7dc23be35efc7c79bdbb8cb783a40c78","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    periodic auditing notifications nova sends. Because there are so many"},{"line_number":34,"context_line":"    state change notifications, and because currently we\u0027re forced to go to"},{"line_number":35,"context_line":"    the nova API for updates, some notifications are processed only as updates"},{"line_number":36,"context_line":"    to the indexed elasticsearch data."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    partial_state_updates \u003d True"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_adc44b40","line":36,"updated":"2016-06-21 22:43:53.000000000","message":"I\u0027m okay with limiting the scope of this patch to not cover every possible event, but we probably should comment the actions we know this does not optimize for.  For example, I don\u0027t believe this optimizes for shelving and reboot operations.  There are a number of times that those are in progress and task state changes (reboot_pending -\u003e rebooting, image_upload_pending -\u003e image_upload) which end up hitting the API and probably aren\u0027t required.\nI do wonder if we could optimize that by only doing partial state updates by seeing if task state + -old task state - \"_pending\". \nAll of the above said, I don\u0027t quite know enough about these pending operations to know if we really can optimize them out. My hunch is yes, but not sure.","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"87986bc3eb608f7f995d3985b9669c59e73c7191","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    periodic auditing notifications nova sends. Because there are so many"},{"line_number":34,"context_line":"    state change notifications, and because currently we\u0027re forced to go to"},{"line_number":35,"context_line":"    the nova API for updates, some notifications are processed only as updates"},{"line_number":36,"context_line":"    to the indexed elasticsearch data."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    partial_state_updates \u003d True"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_58eec0b4","line":36,"in_reply_to":"3aaa91ec_adc44b40","updated":"2016-06-23 22:04:13.000000000","message":"Added comment what\u0027s supported","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"e9d529bd7dc23be35efc7c79bdbb8cb783a40c78","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    # All preconditions matched; update_document will attempt"},{"line_number":187,"context_line":"                    # to run a partial document update"},{"line_number":188,"context_line":"                    # TODO(sjmc7) - use the existing update_at to generate"},{"line_number":189,"context_line":"                    # a new timestamp? Still seems kind of made up"},{"line_number":190,"context_line":"                    self.index_helper.update_document("},{"line_number":191,"context_line":"                        state_field_values,"},{"line_number":192,"context_line":"                        instance_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_d2997221","line":189,"updated":"2016-06-21 22:43:53.000000000","message":"That\u0027s a good question. I don\u0027t have a better answer right now.","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"}],"searchlight/tests/unit/test_nova_server_plugin.py":[{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"987658cb9f76cc888b3b0ff62f66360eb9e06714","unresolved":false,"context_lines":[{"line_number":854,"context_line":"                handle_message(delete_events[2],"},{"line_number":855,"context_line":"                               \"compute.instance.shutdown.start\","},{"line_number":856,"context_line":"                               expect_handled\u003dFalse)"},{"line_number":857,"context_line":"                assert_call_counts(es_gets\u003d1)"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"                handle_message(delete_events[3],"},{"line_number":860,"context_line":"                               \"compute.instance.update\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9d85d2_d29f614e","line":857,"updated":"2016-06-21 15:51:57.000000000","message":"Nit. i think it\u0027s easier to rad the code if we always specify the parameter values for assert_call_counts. When scanning the code it makes it explicit what is being tested, as opposed to having to remember the default values. For example using:\n\n    assert_call_counts(get\u003d0, save\u003d0, es_gets\u003d1)\n\ninstead of:\n\n    assert_call_counts(es_gets\u003d1)","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"87986bc3eb608f7f995d3985b9669c59e73c7191","unresolved":false,"context_lines":[{"line_number":854,"context_line":"                handle_message(delete_events[2],"},{"line_number":855,"context_line":"                               \"compute.instance.shutdown.start\","},{"line_number":856,"context_line":"                               expect_handled\u003dFalse)"},{"line_number":857,"context_line":"                assert_call_counts(es_gets\u003d1)"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"                handle_message(delete_events[3],"},{"line_number":860,"context_line":"                               \"compute.instance.update\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_d838f03f","line":857,"in_reply_to":"5a9d85d2_d29f614e","updated":"2016-06-23 22:04:13.000000000","message":"Defaults are zero - they\u0027re specified once there have been calls","commit_id":"dbda5e7164fdeb7b2bd13994fa1f12e98eaac35a"}]}
