)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"742e466570085fa64cb91c24a1b3b30eaa8907fd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"By using aliases instead of indexes we will be able to re-sync a resource type"},{"line_number":18,"context_line":"without any downtime. Each resource type will have two aliases. The first alias"},{"line_number":19,"context_line":"is used for the CRUD operations while a second alias is used for the query"},{"line_number":20,"context_line":"operations."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Id4e3528d2fa568a535c99ec23222d606ec34b4ff"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afc51ec_8ecb5272","line":20,"updated":"2016-03-11 19:26:27.000000000","message":"missing blueprint link.","commit_id":"7b7daca54daf4bd445f1d28044347f3b4d6ab9b0"}],"searchlight/cmd/manage.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        plugins_to_index \u003d []"},{"line_number":65,"context_line":"        for resource_type, ext in six.iteritems(utils.get_search_plugins()):"},{"line_number":66,"context_line":"            plugin_obj \u003d ext.obj"},{"line_number":67,"context_line":"            indices_set.discard(plugin_obj.alias_name_listener)"},{"line_number":68,"context_line":"            types_set.discard(plugin_obj.get_document_type())"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"            skip \u003d (index and plugin_obj.alias_name_listener not in index or"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_3f0aa9d3","line":67,"range":{"start_line":67,"start_character":12,"end_line":67,"end_character":23},"updated":"2016-02-10 00:13:07.000000000","message":"Rename this to \u0027alias set\u0027? Although given it\u0027s transitionary I\u0027d be ok leaving it.","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6c58514a18ad981cfc325d1609d3ceb641911e0a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        # First Pass: Document Types."},{"line_number":82,"context_line":"        if _type:"},{"line_number":83,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"},{"line_number":84,"context_line":"                plugin_obj \u003d ext.obj"},{"line_number":85,"context_line":"                if plugin_obj.parent_plugin:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_709247f7","line":82,"range":{"start_line":82,"start_character":11,"end_line":82,"end_character":16},"updated":"2016-02-18 21:39:36.000000000","message":"This change seems overcomplicated. All we care about is which resource groups will be indexed. The logic therefore is to create a map of resource group-\u003eplugin, and then (potentially in the same loop) add the resource group to the set of groups that need indexing using the same \u0027skip\u0027 logic as the previous code. Doing it by group also makes the later aliasing logic simpler. \n\nIt might make sense to rewrite this as pseudocode from scratch rather than adapt it","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6c58514a18ad981cfc325d1609d3ceb641911e0a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                        LOG.debug(\"Ignoring %s; it is a child of %s\" %"},{"line_number":96,"context_line":"                                  (res_type, parent_type))"},{"line_number":97,"context_line":"                        continue"},{"line_number":98,"context_line":"                types_set.discard(plugin_obj.get_document_type())"},{"line_number":99,"context_line":"                if plugin_obj.get_document_type() in _type:"},{"line_number":100,"context_line":"                    group.append(plugin_obj.resource_group_name)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_30cd5f66","line":98,"range":{"start_line":98,"start_character":62,"end_line":98,"end_character":65},"updated":"2016-02-18 21:39:36.000000000","message":"I think you can keep the indices_set discard here too. That code is intended to make sure that if i specify index names that don\u0027t make sense, i get told","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6c58514a18ad981cfc325d1609d3ceb641911e0a","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Second Pass: Resource Groups (including those from types)."},{"line_number":103,"context_line":"        if group:"},{"line_number":104,"context_line":"            index_names \u003d dict()"},{"line_number":105,"context_line":"            plugin_objs \u003d dict()"},{"line_number":106,"context_line":"            plugins_to_index \u003d []"},{"line_number":107,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_30b39f99","line":104,"range":{"start_line":104,"start_character":30,"end_line":104,"end_character":32},"updated":"2016-02-18 21:39:36.000000000","message":"Nit - prefer {}","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"add797eae8e80898bb8fe69a63227b7b17e650c0","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Second Pass: Resource Groups (including those from types)."},{"line_number":103,"context_line":"        if group:"},{"line_number":104,"context_line":"            index_names \u003d dict()"},{"line_number":105,"context_line":"            plugin_objs \u003d dict()"},{"line_number":106,"context_line":"            plugins_to_index \u003d []"},{"line_number":107,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_ed5f8c73","line":104,"range":{"start_line":104,"start_character":30,"end_line":104,"end_character":32},"in_reply_to":"dae33548_30b39f99","updated":"2016-02-25 21:22:14.000000000","message":"De-nitted.","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"03af532ee2f8d7bf0da566685448bdea5c999fb2","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    index_names[plugin_obj.resource_group_name] \u003d None"},{"line_number":114,"context_line":"                    plugin_objs[plugin_obj.resource_group_name] \u003d plugin_obj"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            # No group, no plugins! Nothing to do except silently return."},{"line_number":117,"context_line":"            return"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if group_set or types_set:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_75bd1901","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":17},"updated":"2016-02-18 21:00:35.000000000","message":"This isn\u0027t right; by specifying nothing, everything should be selected","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"add797eae8e80898bb8fe69a63227b7b17e650c0","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    index_names[plugin_obj.resource_group_name] \u003d None"},{"line_number":114,"context_line":"                    plugin_objs[plugin_obj.resource_group_name] \u003d plugin_obj"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            # No group, no plugins! Nothing to do except silently return."},{"line_number":117,"context_line":"            return"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if group_set or types_set:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_0dd630c5","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":17},"in_reply_to":"dae33548_75bd1901","updated":"2016-02-25 21:22:14.000000000","message":"Good catch. Nothing is now everything!","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        if _type:"},{"line_number":89,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"},{"line_number":90,"context_line":"                plugin_obj \u003d ext.obj"},{"line_number":91,"context_line":"                if plugin_obj.parent_plugin:"},{"line_number":92,"context_line":"                    parent_type \u003d plugin_obj.parent_plugin.document_type"},{"line_number":93,"context_line":"                    if res_type in _type:"},{"line_number":94,"context_line":"                        print(\"\u0027%s\u0027 is a child of \u0027%s\u0027 and cannot be indexed \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_3e55d34f","line":91,"range":{"start_line":91,"start_character":30,"end_line":91,"end_character":43},"updated":"2016-02-26 22:45:47.000000000","message":"Do we need this check at all any more? Since indexing a type implies indexing all types in the same resource group, and child plugins are always in the same group as their parent, this now seems superfluous.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        if _type:"},{"line_number":89,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"},{"line_number":90,"context_line":"                plugin_obj \u003d ext.obj"},{"line_number":91,"context_line":"                if plugin_obj.parent_plugin:"},{"line_number":92,"context_line":"                    parent_type \u003d plugin_obj.parent_plugin.document_type"},{"line_number":93,"context_line":"                    if res_type in _type:"},{"line_number":94,"context_line":"                        print(\"\u0027%s\u0027 is a child of \u0027%s\u0027 and cannot be indexed \""}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_e7f46588","line":91,"range":{"start_line":91,"start_character":30,"end_line":91,"end_character":43},"in_reply_to":"9aed3d3a_3e55d34f","updated":"2016-03-09 00:34:17.000000000","message":"It is no longer needed. Removed.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            # Nothing was specified, re-sync everything."},{"line_number":123,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"},{"line_number":124,"context_line":"                plugin_obj \u003d ext.obj"},{"line_number":125,"context_line":"                plugins_to_index.append((res_type, ext))"},{"line_number":126,"context_line":"                plugin_objs[plugin_obj.resource_group_name] \u003d plugin_obj"},{"line_number":127,"context_line":"                # None will force a new ES index when indexing the first time."},{"line_number":128,"context_line":"                index_names[plugin_obj.resource_group_name] \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_eb056ac2","line":125,"range":{"start_line":125,"start_character":16,"end_line":125,"end_character":32},"updated":"2016-02-26 22:45:47.000000000","message":"If no group is specified this isn\u0027t initialized (same with following lines) and raises an exception. The \u0027if\u0027 and \u0027else\u0027 sections here are very similar; i would recommend combining them.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            # Nothing was specified, re-sync everything."},{"line_number":123,"context_line":"            for res_type, ext in six.iteritems(utils.get_search_plugins()):"},{"line_number":124,"context_line":"                plugin_obj \u003d ext.obj"},{"line_number":125,"context_line":"                plugins_to_index.append((res_type, ext))"},{"line_number":126,"context_line":"                plugin_objs[plugin_obj.resource_group_name] \u003d plugin_obj"},{"line_number":127,"context_line":"                # None will force a new ES index when indexing the first time."},{"line_number":128,"context_line":"                index_names[plugin_obj.resource_group_name] \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_27ef6db1","line":125,"range":{"start_line":125,"start_character":16,"end_line":125,"end_character":32},"in_reply_to":"9aed3d3a_eb056ac2","updated":"2016-03-09 00:34:17.000000000","message":"Combined.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                Resource Group. Independent of the order within the"},{"line_number":182,"context_line":"                plugins_to_index list."},{"line_number":183,"context_line":"                \"\"\""},{"line_number":184,"context_line":"                index_names[group_name] \u003d plugin_obj.initial_indexing("},{"line_number":185,"context_line":"                    clear\u003dclear,"},{"line_number":186,"context_line":"                    index_name\u003dindex_names[group_name])"},{"line_number":187,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_1eac4f34","line":184,"range":{"start_line":184,"start_character":16,"end_line":184,"end_character":27},"updated":"2016-02-26 22:45:47.000000000","message":"Still not crazy about doing it this way. I don\u0027t see any advantage to have the index name determination and creation inside the plugin code versus doing that first and passing it in given that it is now not possible to reindex individual plugins","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                Resource Group. Independent of the order within the"},{"line_number":182,"context_line":"                plugins_to_index list."},{"line_number":183,"context_line":"                \"\"\""},{"line_number":184,"context_line":"                index_names[group_name] \u003d plugin_obj.initial_indexing("},{"line_number":185,"context_line":"                    clear\u003dclear,"},{"line_number":186,"context_line":"                    index_name\u003dindex_names[group_name])"},{"line_number":187,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_c7368951","line":184,"range":{"start_line":184,"start_character":16,"end_line":184,"end_character":27},"in_reply_to":"9aed3d3a_1eac4f34","updated":"2016-03-09 00:34:17.000000000","message":"Moved outside of the plugin code.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        #         zip(index_names.items(), plugin_obj.itmes())):"},{"line_number":182,"context_line":"        #     plugin_obj.alias_search_update(index_name)"},{"line_number":183,"context_line":"        for group, search, listen in resource_groups:"},{"line_number":184,"context_line":"            utils.alias_search_update(search, index_names[group])"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        # Step #4: The \"search\" alias has been updated. Update the \"listener\""},{"line_number":187,"context_line":"        #   alias. This involves both removing the old index from the alias"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_e25372e0","line":184,"range":{"start_line":184,"start_character":18,"end_line":184,"end_character":37},"updated":"2016-03-09 21:19:50.000000000","message":"utils here refers to common.utils","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        #   outside of the plugins."},{"line_number":190,"context_line":"        #   NB: The \"search\" alias remains unchanged for this step."},{"line_number":191,"context_line":"        for group, search, listen in resource_groups:"},{"line_number":192,"context_line":"            utils.alias_listener_update(listen, index_names[group])"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_0265beb3","line":192,"range":{"start_line":192,"start_character":18,"end_line":192,"end_character":39},"updated":"2016-03-09 21:19:50.000000000","message":"utils here refers to common.utils","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1a5f186dc0af7343a83b4d41f8fcaf3325219df1","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            plugin_obj \u003d ext.obj"},{"line_number":171,"context_line":"            group_name \u003d plugin_obj.resource_group_name"},{"line_number":172,"context_line":"            try:"},{"line_number":173,"context_line":"                plugin_obj.initial_indexing(clear\u003dclear,"},{"line_number":174,"context_line":"                                            index_name\u003dindex_names[group_name])"},{"line_number":175,"context_line":"            except Exception as e:"},{"line_number":176,"context_line":"                LOG.error(_LE(\"Failed to setup index extension \""}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_fa5bdb83","line":173,"range":{"start_line":173,"start_character":44,"end_line":173,"end_character":49},"updated":"2016-03-10 20:33:08.000000000","message":"The \u0027clear\u0027 argument doesn\u0027t make sense any more.","commit_id":"598cc0b6f8732c34064b339899ff73458310083c"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"57f854d9b83d363e0a0523556eb9a5ad074aa113","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        #   NB: The \"search\" alias remains unchanged for this step."},{"line_number":145,"context_line":"        index_names \u003d {}"},{"line_number":146,"context_line":"        for group, search, listen in resource_groups:"},{"line_number":147,"context_line":"            index_names[group] \u003d es_utils.setup_aliases(group, search, listen)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        # Step #2: Re-index all resource types in this Resource Type Group."},{"line_number":150,"context_line":"        #   Implicit in this step is to create the settings/mappings needed"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_bfcb8ca4","line":147,"updated":"2016-03-14 17:00:49.000000000","message":"This adds the index to the alias even though the mappings aren\u0027t setup in the index.  The listeners will start publishing to the new index immediately, but until the mapping is applied new data from the listeners won\u0027t be mapped correctly.  I believe the mapping needs to be applied from each plugin at the time the index is created, then the index should be added to the alias.  then the full indexing.","commit_id":"6ce917a23084dc687017c060f1f1b12892fdb387"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"b82446ffee57dfdb1d81fb4ef5d6656a222f6991","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        index_names \u003d {}"},{"line_number":146,"context_line":"        for group, search, listen in resource_groups:"},{"line_number":147,"context_line":"            index_names[group] \u003d es_utils.setup_aliases(group, search, listen)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        # Step #2: Re-index all resource types in this Resource Type Group."},{"line_number":150,"context_line":"        #   Implicit in this step is to create the settings/mappings needed"},{"line_number":151,"context_line":"        #   for each document type in the new index."}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_ce9a2863","line":148,"updated":"2016-03-14 18:24:00.000000000","message":"If there are any error in any of the processing anywhere along here, there is no cleanup logic.  The indexes will continue to exist and be part of the alias, meaning the listeners will be populating outdated indexes from now until somebody happens to notice.\n\nJust in my testing with stopping and starting at breakpoints a few times, i ended up with multiple dead indices.\n\nI guess this can be handled in the following bug (but this will require discussion):\n\nhttps://bugs.launchpad.net/searchlight/+bug/1557003\n\nE.g. GET searchlight-listener/_status\n\n {\n   \"_shards\": {\n      \"total\": 30,\n      \"successful\": 15,\n      \"failed\": 0\n   },\n   \"indices\": {\n      \"searchlight-2016_03_14_18_14_12\": {\n      },\n      \"searchlight-2016_03_14_16_39_01\": {\n      },\n      \"searchlight-2016_03_14_18_12_06\": {\n         }\n      }\n   }\n }","commit_id":"6ce917a23084dc687017c060f1f1b12892fdb387"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"afedc12a2fab041f91ca7595e3dff2f9cc158691","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        for resource_type, ext in plugins_to_index:"},{"line_number":149,"context_line":"            plugin_obj \u003d ext.obj"},{"line_number":150,"context_line":"            group_name \u003d plugin_obj.resource_group_name"},{"line_number":151,"context_line":"            plugin_obj.prepare_index(index_name\u003dindex_names[group_name])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Step #2: Setup the aliases for all Resource Type Group."},{"line_number":154,"context_line":"        #   These actions need to happen outside of the plugins."}],"source_content_type":"text/x-python","patch_set":14,"id":"3afc51ec_f378a4c6","line":151,"updated":"2016-03-14 20:40:35.000000000","message":"If there is a failure here the program exits and you are left with an orphaned index.  Best to add an except handler here that attempt to delete all new indexes.","commit_id":"b8491bc97dd84d79f523b3a2a6c088053556fe4e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"8e9b451d0a8f97fa1016709dfc56b94415414942","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        for resource_type, ext in plugins_to_index:"},{"line_number":149,"context_line":"            plugin_obj \u003d ext.obj"},{"line_number":150,"context_line":"            group_name \u003d plugin_obj.resource_group_name"},{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                plugin_obj.prepare_index(index_name\u003dindex_names[group_name])"},{"line_number":153,"context_line":"            except Exception:"},{"line_number":154,"context_line":"                for group, search, listen in resource_groups:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afc51ec_c4220001","line":151,"updated":"2016-03-14 21:39:33.000000000","message":"I\u0027d put this try starting on line 146 and the except wrap both loops.  If anything fails here, let\u0027s try to clean up all and then print a message and abort.","commit_id":"e9d9061bcb434acd008336fb071cf473a76def60"}],"searchlight/elasticsearch/__init__.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            plugin_list.append({"},{"line_number":83,"context_line":"                \u0027name\u0027: plugin_type,"},{"line_number":84,"context_line":"                \u0027type\u0027: plugin.obj.get_document_type(),"},{"line_number":85,"context_line":"                \u0027index\u0027: plugin.obj.alias_name_search"},{"line_number":86,"context_line":"            })"},{"line_number":87,"context_line":"        return {\u0027plugins\u0027: sorted(plugin_list,"},{"line_number":88,"context_line":"                                  key\u003doperator.itemgetter(\u0027name\u0027))}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_7f0021ab","line":85,"range":{"start_line":85,"start_character":32,"end_line":85,"end_character":35},"updated":"2016-02-10 00:13:07.000000000","message":"Be worth documenting that we intend to leave this called \u0027index\u0027 for compatibility with elasticsearch-type clients.","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"}],"searchlight/elasticsearch/plugins/base.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"indexer_opts \u003d ["},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027resource_group_name\u0027, default\u003d\"searchlight\","},{"line_number":38,"context_line":"               help\u003d\"The default Elasticsearch index for plugins\"),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027notifications_topic\u0027, default\u003d\"searchlight_indexer\","},{"line_number":40,"context_line":"               help\u003d\"The default messaging notifications topic\")"},{"line_number":41,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_ff2ad12b","line":38,"range":{"start_line":38,"start_character":47,"end_line":38,"end_character":52},"updated":"2016-02-10 00:13:07.000000000","message":"This help text is no longer accurate","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            return"},{"line_number":115,"context_line":"     "},{"line_number":116,"context_line":"        # TODO (ricka) Look at race conditions and corner cases."},{"line_number":117,"context_line":"        # (1) Only one of the aliases exist? (2) UUID clashing?"},{"line_number":118,"context_line":"        index_name \u003d self.resource_group_name + \u0027-\u0027 + uuid.uuid4().hex"},{"line_number":119,"context_line":"        self.engine.indices.create(index\u003dindex_name)"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_bf5bf953","line":117,"range":{"start_line":117,"start_character":38,"end_line":117,"end_character":43},"updated":"2016-02-10 00:13:07.000000000","message":"UUIDs will \u0027never\u0027 clash for our purposes. That said, I think i\u0027d much prefer date-based index names. I forsee a horrorshow of windows registry-like index listings.","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    #     return index_exists"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def setup_index_settings(self, index_name):"},{"line_number":156,"context_line":"        \"\"\" Update index settings. \"\"\""},{"line_number":157,"context_line":"        index_settings \u003d self.get_settings()"},{"line_number":158,"context_line":"        if index_settings:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_5f2f65a1","line":155,"range":{"start_line":155,"start_character":35,"end_line":155,"end_character":45},"updated":"2016-02-10 00:13:07.000000000","message":"This might get a little confused with the \u0027index_name\u0027 of the plugin but if we\u0027re removing that, then it\u0027s ok","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        \"\"\""},{"line_number":326,"context_line":"        return None"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    # TODO (ricka) Remove completely."},{"line_number":329,"context_line":"    # def get_index_name(self):"},{"line_number":330,"context_line":"    #     if self.options.index_name is not None:"},{"line_number":331,"context_line":"    #         return self.options.index_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_bf09b933","line":328,"range":{"start_line":328,"start_character":19,"end_line":328,"end_character":25},"updated":"2016-02-10 00:13:07.000000000","message":"Yes!","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"851891f99e8f7549522274daf3f70d20b90d4c2b","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"indexer_opts \u003d ["},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027resource_group_name\u0027, default\u003d\"searchlight\","},{"line_number":41,"context_line":"               help\u003d\"The default base name for accessing Elasticsearch\"),"},{"line_number":42,"context_line":"    cfg.StrOpt(\u0027notifications_topic\u0027, default\u003d\"searchlight_indexer\","},{"line_number":43,"context_line":"               help\u003d\"The default messaging notifications topic\")"},{"line_number":44,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_52fd8baf","line":41,"range":{"start_line":41,"start_character":47,"end_line":41,"end_character":56},"updated":"2016-02-18 20:51:16.000000000","message":"This phrasing seems awkward. Perhaps \u0027base name for Elasticsearch indices\u0027)?","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"851891f99e8f7549522274daf3f70d20b90d4c2b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def name(self):"},{"line_number":72,"context_line":"        return \"%s-%s\" % (self.resource_group_name, self.document_type)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def initial_indexing(self, clear\u003dTrue, index_name\u003dNone, setup_data\u003dTrue):"},{"line_number":75,"context_line":"        \"\"\"Create an alias for this resource group and add data for this"},{"line_number":76,"context_line":"           resource type."},{"line_number":77,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_b2bcd7dc","line":74,"range":{"start_line":74,"start_character":54,"end_line":74,"end_character":58},"updated":"2016-02-18 20:51:16.000000000","message":"Is this really allowed to be None? I think it makes more sense to me to determine the new index name outside of this function for the entire resource group","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"851891f99e8f7549522274daf3f70d20b90d4c2b","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                    self.index_name,"},{"line_number":161,"context_line":"                    child_plugin.get_document_type())"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def setup_alias(self, index_name\u003dNone):"},{"line_number":164,"context_line":"        \"\"\"Create all needed aliases. Each Resource Type Group will have two"},{"line_number":165,"context_line":"           aliases. Each alias will point to the same internal index. As a"},{"line_number":166,"context_line":"           reminder, all ES CRUD operations should go to the listener alias."}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_7276cf06","line":163,"range":{"start_line":163,"start_character":8,"end_line":163,"end_character":19},"updated":"2016-02-18 20:51:16.000000000","message":"As i read this i become more convinced that this code needs to go elsewhere. I know that the precedent is that each plugin was potentially creating its own index, but there\u0027s a lot of code now in here that only executes under very precise conditions and is not really related to a plugin so much as to an operational detail.\n\nIt seems like it would be much cleaner if plugins/base was limited to creating the mapping for its own type, and move the index and alias creation for a resource group elsewhere.","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"851891f99e8f7549522274daf3f70d20b90d4c2b","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        # TODO(ricka) Look at race conditions and corner cases."},{"line_number":178,"context_line":"        # (1) Only one of the aliases exist? (2) UUID clashing?"},{"line_number":179,"context_line":"        if not index_name:"},{"line_number":180,"context_line":"            index_name \u003d self.resource_group_name + \u0027-\u0027 + uuid.uuid4().hex"},{"line_number":181,"context_line":"            self.engine.indices.create(index\u003dindex_name)"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_f2a93f91","line":179,"range":{"start_line":179,"start_character":15,"end_line":179,"end_character":25},"updated":"2016-02-18 20:51:16.000000000","message":"Yeah, I don\u0027t like this. Can we determine the index name before we get this deep? Otherwise it\u0027s not just \u0027setup_alias\u0027, it\u0027s \u0027setup_alias_and_possibly_create_index\u0027","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"851891f99e8f7549522274daf3f70d20b90d4c2b","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        # TODO(ricka) Look at race conditions and corner cases."},{"line_number":178,"context_line":"        # (1) Only one of the aliases exist? (2) UUID clashing?"},{"line_number":179,"context_line":"        if not index_name:"},{"line_number":180,"context_line":"            index_name \u003d self.resource_group_name + \u0027-\u0027 + uuid.uuid4().hex"},{"line_number":181,"context_line":"            self.engine.indices.create(index\u003dindex_name)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        self.setup_index_settings(index_name\u003dindex_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_d29a3b61","line":180,"range":{"start_line":180,"start_character":30,"end_line":180,"end_character":49},"updated":"2016-02-18 20:51:16.000000000","message":"And i still REALLY don\u0027t like using UUIDs. My vote would be YYYYmmDD-HHMMss","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        if not self.parent_plugin:"},{"line_number":315,"context_line":"            parent.child_plugins.append(self)"},{"line_number":316,"context_line":"            self.parent_plugin \u003d parent"},{"line_number":317,"context_line":"            self.index_name \u003d parent.index_name"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def get_index_display_name(self, indent_level\u003d0):"},{"line_number":320,"context_line":"        \"\"\"The string used to list this plugin when indexing\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_92a9737e","side":"PARENT","line":317,"range":{"start_line":317,"start_character":37,"end_line":317,"end_character":47},"updated":"2016-02-26 22:45:47.000000000","message":"Deleting this may cause problems. The intent was to disallow a child plugin existing in a separate RG from its parent","commit_id":"7001a1b04e639777ee12c0da3903fd68e3325e29"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if clear:"},{"line_number":91,"context_line":"            # First delete the doc type"},{"line_number":92,"context_line":"            self.clear_data()"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        # TODO(ricka) How should we handle exceptions from ElasticSearch?"},{"line_number":95,"context_line":"        ret_index_name \u003d self.setup_alias(index_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_75dc99e4","line":92,"range":{"start_line":92,"start_character":17,"end_line":92,"end_character":27},"updated":"2016-02-26 22:45:47.000000000","message":"This no longer really makes sense to do?","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            self.clear_data()"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        # TODO(ricka) How should we handle exceptions from ElasticSearch?"},{"line_number":95,"context_line":"        ret_index_name \u003d self.setup_alias(index_name)"},{"line_number":96,"context_line":"        if setup_data:"},{"line_number":97,"context_line":"            self.setup_data()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_552195b3","line":95,"range":{"start_line":95,"start_character":30,"end_line":95,"end_character":41},"updated":"2016-02-26 22:45:47.000000000","message":"I\u0027d still be inclined to do this elsewhere, not for each plugin indexing","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":118,"context_line":"           search alias. To avoid a race condition we will need to"},{"line_number":119,"context_line":"           perform the remove and add atomically (within ElasticSearch)."},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        current_index \u003d self.engine.get_alias(name\u003dself.alias_name_search)"},{"line_number":122,"context_line":"        body \u003d {"},{"line_number":123,"context_line":"            \u0027actions\u0027: ["},{"line_number":124,"context_line":"                {\u0027remove\u0027: {"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_eb88ca24","line":121,"range":{"start_line":121,"start_character":36,"end_line":121,"end_character":45},"updated":"2016-02-26 22:45:47.000000000","message":"AttributeError: \u0027Elasticsearch\u0027 object has no attribute \u0027get_alias\u0027 (elasticsearch\u003d\u003d1.9). Should be self.engine.indices.get_alias. \n\nAnd current_index is a bit misleading","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"           search alias. To avoid a race condition we will need to"},{"line_number":119,"context_line":"           perform the remove and add atomically (within ElasticSearch)."},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        current_index \u003d self.engine.get_alias(name\u003dself.alias_name_search)"},{"line_number":122,"context_line":"        body \u003d {"},{"line_number":123,"context_line":"            \u0027actions\u0027: ["},{"line_number":124,"context_line":"                {\u0027remove\u0027: {"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_474b99c9","line":121,"range":{"start_line":121,"start_character":36,"end_line":121,"end_character":45},"in_reply_to":"9aed3d3a_eb88ca24","updated":"2016-03-09 00:34:17.000000000","message":"Fixed.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        body \u003d {"},{"line_number":123,"context_line":"            \u0027actions\u0027: ["},{"line_number":124,"context_line":"                {\u0027remove\u0027: {"},{"line_number":125,"context_line":"                    \u0027index\u0027: current_index[0],"},{"line_number":126,"context_line":"                    \u0027alias\u0027: self.alias_name_search}},"},{"line_number":127,"context_line":"                {\u0027add\u0027: {"},{"line_number":128,"context_line":"                    \u0027index\u0027: index_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_ebc72a10","line":125,"range":{"start_line":125,"start_character":29,"end_line":125,"end_character":42},"updated":"2016-02-26 22:45:47.000000000","message":"If the alias doesn\u0027t already exist, this won\u0027t be populated. Also why current_index[0] ?","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        body \u003d {"},{"line_number":123,"context_line":"            \u0027actions\u0027: ["},{"line_number":124,"context_line":"                {\u0027remove\u0027: {"},{"line_number":125,"context_line":"                    \u0027index\u0027: current_index[0],"},{"line_number":126,"context_line":"                    \u0027alias\u0027: self.alias_name_search}},"},{"line_number":127,"context_line":"                {\u0027add\u0027: {"},{"line_number":128,"context_line":"                    \u0027index\u0027: index_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_c70de991","line":125,"range":{"start_line":125,"start_character":29,"end_line":125,"end_character":42},"in_reply_to":"9aed3d3a_ebc72a10","updated":"2016-03-09 00:34:17.000000000","message":"Added a comment.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.engine.indices.update_aliases(body)"},{"line_number":144,"context_line":"        self._delete_index(index_name)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _delete_index(self, index_name):"},{"line_number":147,"context_line":"        self.engine.indices.delete(index\u003dindex_name)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def clear_data(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_a81ec860","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":21},"updated":"2016-02-26 22:45:47.000000000","message":"Think this would also make more sense to be elsewhere. It\u0027s not really plugin-specific.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.engine.indices.update_aliases(body)"},{"line_number":144,"context_line":"        self._delete_index(index_name)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _delete_index(self, index_name):"},{"line_number":147,"context_line":"        self.engine.indices.delete(index\u003dindex_name)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def clear_data(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_e722a500","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":21},"in_reply_to":"9aed3d3a_a81ec860","updated":"2016-03-09 00:34:17.000000000","message":"Removed as part of the revamping.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        for child_plugin in self.child_plugins:"},{"line_number":155,"context_line":"            self.engine.indices.delete_mapping("},{"line_number":156,"context_line":"                self.index_name,"},{"line_number":157,"context_line":"                child_plugin.get_document_type(),"},{"line_number":158,"context_line":"                ignore\u003d404)"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_4b9f3650","line":156,"range":{"start_line":156,"start_character":21,"end_line":156,"end_character":31},"updated":"2016-02-26 22:45:47.000000000","message":"This no longer exists","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        for child_plugin in self.child_plugins:"},{"line_number":155,"context_line":"            self.engine.indices.delete_mapping("},{"line_number":156,"context_line":"                self.index_name,"},{"line_number":157,"context_line":"                child_plugin.get_document_type(),"},{"line_number":158,"context_line":"                ignore\u003d404)"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_677df5e6","line":156,"range":{"start_line":156,"start_character":21,"end_line":156,"end_character":31},"in_reply_to":"9aed3d3a_4b9f3650","updated":"2016-03-09 00:34:17.000000000","message":"And thus it has been removed.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # TODO(ricka) Look at race conditions and corner cases."},{"line_number":175,"context_line":"        # (1) Only one of the aliases exist? (2) UUID clashing?"},{"line_number":176,"context_line":"        if not index_name:"},{"line_number":177,"context_line":"            index_name \u003d self.resource_group_name + \u0027-\u0027 + uuid.uuid4().hex"},{"line_number":178,"context_line":"            self.engine.indices.create(index\u003dindex_name)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        self.setup_index_settings(index_name\u003dindex_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_282118a0","line":177,"range":{"start_line":177,"start_character":58,"end_line":177,"end_character":62},"updated":"2016-02-26 22:45:47.000000000","message":"Still don\u0027t like uuid for this :(","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # TODO(ricka) Look at race conditions and corner cases."},{"line_number":175,"context_line":"        # (1) Only one of the aliases exist? (2) UUID clashing?"},{"line_number":176,"context_line":"        if not index_name:"},{"line_number":177,"context_line":"            index_name \u003d self.resource_group_name + \u0027-\u0027 + uuid.uuid4().hex"},{"line_number":178,"context_line":"            self.engine.indices.create(index\u003dindex_name)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        self.setup_index_settings(index_name\u003dindex_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_27748dfb","line":177,"range":{"start_line":177,"start_character":58,"end_line":177,"end_character":62},"in_reply_to":"9aed3d3a_282118a0","updated":"2016-03-09 00:34:17.000000000","message":"Just for you it is now date-based, along with the requisite retry loop for clashes.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        \"\"\"The string used to list this plugin when indexing\"\"\""},{"line_number":402,"context_line":"        display \u003d \u0027\\n\u0027 + \u0027    \u0027 * indent_level + \u0027--\u003e \u0027 if indent_level else \u0027\u0027"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        display +\u003d \u0027%s (%s)\u0027 % (self.document_type, self.index_name)"},{"line_number":405,"context_line":"        display +\u003d \u0027\u0027.join(c.get_index_display_name(indent_level + 1)"},{"line_number":406,"context_line":"                           for c in self.child_plugins)"},{"line_number":407,"context_line":"        return display"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_6bcf9a7f","line":404,"range":{"start_line":404,"start_character":57,"end_line":404,"end_character":67},"updated":"2016-02-26 22:45:47.000000000","message":"index_name no longer exists","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        \"\"\"The string used to list this plugin when indexing\"\"\""},{"line_number":402,"context_line":"        display \u003d \u0027\\n\u0027 + \u0027    \u0027 * indent_level + \u0027--\u003e \u0027 if indent_level else \u0027\u0027"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        display +\u003d \u0027%s (%s)\u0027 % (self.document_type, self.index_name)"},{"line_number":405,"context_line":"        display +\u003d \u0027\u0027.join(c.get_index_display_name(indent_level + 1)"},{"line_number":406,"context_line":"                           for c in self.child_plugins)"},{"line_number":407,"context_line":"        return display"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_8761213c","line":404,"range":{"start_line":404,"start_character":57,"end_line":404,"end_character":67},"in_reply_to":"9aed3d3a_6bcf9a7f","updated":"2016-03-09 00:34:17.000000000","message":"It has been changed.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        \"\"\"The string used to list this plugin when indexing\"\"\""},{"line_number":331,"context_line":"        display \u003d \u0027\\n\u0027 + \u0027    \u0027 * indent_level + \u0027--\u003e \u0027 if indent_level else \u0027\u0027"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        display +\u003d \u0027%s (%s)\u0027 % (self.document_type, self.index_name)"},{"line_number":334,"context_line":"        display +\u003d \u0027\u0027.join(c.get_index_display_name(indent_level + 1)"},{"line_number":335,"context_line":"                           for c in self.child_plugins)"},{"line_number":336,"context_line":"        return display"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_7fe6dd15","line":333,"range":{"start_line":333,"start_character":57,"end_line":333,"end_character":67},"updated":"2016-03-09 21:19:50.000000000","message":"This no longer exists. Should be resource group name","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1a5f186dc0af7343a83b4d41f8fcaf3325219df1","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        for child_plugin in self.child_plugins:"},{"line_number":108,"context_line":"            child_plugin.check_mapping_sort_fields()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if clear:"},{"line_number":111,"context_line":"            # First delete the doc type (and mapping)."},{"line_number":112,"context_line":"            self.clear_data()"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_baf31372","line":110,"range":{"start_line":110,"start_character":11,"end_line":110,"end_character":16},"updated":"2016-03-10 20:33:08.000000000","message":"This (and clear_data) no longer make sense; we don\u0027t want to clear data out of the old index. And in E-S 2.x this won\u0027t be valid at all.","commit_id":"598cc0b6f8732c34064b339899ff73458310083c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6abb051c45b8ef96bb3e0ecf49b75d3c32c3c45b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            documents.append(document)"},{"line_number":141,"context_line":"            version \u003d self.NotificationHandlerCls.get_version(document)"},{"line_number":142,"context_line":"            versions.append(version)"},{"line_number":143,"context_line":"        self.index_helper.save_documents(documents, versions\u003dversions)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        for child_plugin in self.child_plugins:"},{"line_number":146,"context_line":"            child_plugin.setup_data()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_e0f4c5f1","line":143,"range":{"start_line":143,"start_character":26,"end_line":143,"end_character":40},"updated":"2016-03-10 23:08:30.000000000","message":"This isn\u0027t correct. The index helper has the listener alias as the equivalent of index_name, which means that during an initial data dump we\u0027ll end up indexing into the old AND new indices at the same time.","commit_id":"7b7daca54daf4bd445f1d28044347f3b4d6ab9b0"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"8035e090fb50d7d7378d2f724eefb6c368ff8e23","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            documents.append(document)"},{"line_number":141,"context_line":"            version \u003d self.NotificationHandlerCls.get_version(document)"},{"line_number":142,"context_line":"            versions.append(version)"},{"line_number":143,"context_line":"        self.index_helper.save_documents(documents, versions\u003dversions)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        for child_plugin in self.child_plugins:"},{"line_number":146,"context_line":"            child_plugin.setup_data()"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afc51ec_0e790294","line":143,"range":{"start_line":143,"start_character":26,"end_line":143,"end_character":40},"in_reply_to":"5aef4532_e0f4c5f1","updated":"2016-03-11 19:15:02.000000000","message":"Yeah, I don\u0027t think we want to do that from a performance perspective. It is extra overhead on elasticsearch and ideally we should get the new index loaded as fast as possible. This would thrash the CPU more.  The net result is kind of interesting in that it would mean from an \"additive\" perspective the old index actually becomes more correct as it goes through the indexing process. So even if complete re-indexing fails at some point, the old index would at least have more missing documents (if any were missing) (and any documents that should have been deleted). right?","commit_id":"7b7daca54daf4bd445f1d28044347f3b4d6ab9b0"}],"searchlight/elasticsearch/plugins/utils.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                chunk_size\u003dself.index_chunk_size,"},{"line_number":168,"context_line":"                actions\u003dself._apply_role_filtering(documents))"},{"line_number":169,"context_line":"            LOG.debug(\"Indexing result: %s\", result)"},{"line_number":170,"context_line":"        except es_exc.RequestError as e:"},{"line_number":171,"context_line":"            # TODO (ricka) Verify this is the IllegalArgument exception."},{"line_number":172,"context_line":"            self._index_alias_multiple_indexes_bulk(documents)"},{"line_number":173,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_0a268dba","line":170,"range":{"start_line":170,"start_character":22,"end_line":170,"end_character":34},"updated":"2016-02-10 00:13:07.000000000","message":"Is it guaranteed that all the inserts will fail? Safer to filter the list, given that this is a somewhat exceptional circumstance? How would it interact with the versioning patch otherwise?","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"daaefc53c0e731e3fcb2993421c1f16fc5777562","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                actions\u003dactions)"},{"line_number":233,"context_line":"            LOG.debug(\"Update result: %s\", result)"},{"line_number":234,"context_line":"        except es_exc.RequestError as e:"},{"line_number":235,"context_line":"            # TODO (ricka) Verify this is the IllegalArgument exception."},{"line_number":236,"context_line":"            self._index_alias_multiple_indexes_bulk(documents)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def _apply_role_filtering(self, documents):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_ca1f155a","line":235,"range":{"start_line":235,"start_character":27,"end_line":235,"end_character":33},"updated":"2016-02-10 00:13:07.000000000","message":"Yes.. :)","commit_id":"3f5b467900ed697e91ec52ca565cc4119fc05b40"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"851891f99e8f7549522274daf3f70d20b90d4c2b","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            LOG.debug(\"Indexing result: %s\", result)"},{"line_number":183,"context_line":"        except es_exc.RequestError:"},{"line_number":184,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":185,"context_line":"            self._index_alias_multiple_indexes_bulk(documents\u003ddocuments)"},{"line_number":186,"context_line":"            pass"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def delete_document_by_id(self, document_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_b24cd79e","line":185,"range":{"start_line":185,"start_character":17,"end_line":185,"end_character":51},"updated":"2016-02-18 20:51:16.000000000","message":"Missing apply_role_filtering; I would strongly suggest refactoring this such that the helpers.bulk call is within an anonymous function that takes an index name and that can be handed to _index_alias_multiple_indexes_bulk (or just inline that for loop)","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"add797eae8e80898bb8fe69a63227b7b17e650c0","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            LOG.debug(\"Indexing result: %s\", result)"},{"line_number":183,"context_line":"        except es_exc.RequestError:"},{"line_number":184,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":185,"context_line":"            self._index_alias_multiple_indexes_bulk(documents\u003ddocuments)"},{"line_number":186,"context_line":"            pass"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def delete_document_by_id(self, document_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_2d3b34ed","line":185,"range":{"start_line":185,"start_character":17,"end_line":185,"end_character":51},"in_reply_to":"dae33548_b24cd79e","updated":"2016-02-25 21:22:14.000000000","message":"The call to apply_role_filtering happens in _index_alias_multiple_indexes_bulk.\n\nThe call to _index_alias_multiple_indexes_bulk will happen only during a resync. This will happen rarely.  For the vast, vast majority of the time, we will call helpers.bulk and it will work fine without throwing an exception, I was trying to keep the mainstream case simple and not polluting save_documents() with knowledge of multiple indexes in an alias.","commit_id":"19d6c4098882e51a8e57443cfec411861270ff56"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"627bb5c876e24df7fd8c8ef18323a2b3bcb29180","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                err_msg.append(\"id %(_id)s: %(error)s\" % err[\u0027index\u0027])"},{"line_number":195,"context_line":"            LOG.warning(_LW(\u0027Version conflict %s\u0027) % \u0027;\u0027.join(err_msg))"},{"line_number":196,"context_line":"            result \u003d 0"},{"line_number":197,"context_line":"        except es_exc.RequestError:"},{"line_number":198,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":199,"context_line":"            self._index_alias_multiple_indexes_bulk(documents\u003ddocuments,"},{"line_number":200,"context_line":"                                                    versions\u003dversions)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_5eeed7b4","line":197,"range":{"start_line":197,"start_character":22,"end_line":197,"end_character":34},"updated":"2016-02-26 22:45:47.000000000","message":"It might be neater to extract the bulk calls into a function (self._execute_bulk) that handles this exception condition in one place. Some of these functions are getting a bit hard to read. I\u0027d be ok with doing a refactoring later, once everything works.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"c44a7653ccd358fa7034867f120cf81d126345e6","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                err_msg.append(\"id %(_id)s: %(error)s\" % err[\u0027index\u0027])"},{"line_number":195,"context_line":"            LOG.warning(_LW(\u0027Version conflict %s\u0027) % \u0027;\u0027.join(err_msg))"},{"line_number":196,"context_line":"            result \u003d 0"},{"line_number":197,"context_line":"        except es_exc.RequestError:"},{"line_number":198,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":199,"context_line":"            self._index_alias_multiple_indexes_bulk(documents\u003ddocuments,"},{"line_number":200,"context_line":"                                                    versions\u003dversions)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_4750b95d","line":197,"range":{"start_line":197,"start_character":22,"end_line":197,"end_character":34},"in_reply_to":"9aed3d3a_5eeed7b4","updated":"2016-03-09 00:34:17.000000000","message":"Will consider refactoring later.","commit_id":"62a504b46b0f5df82c73e42a10fa64213f645ae8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    index_name \u003d None"},{"line_number":58,"context_line":"    while not index_name:"},{"line_number":59,"context_line":"        index_name \u003d (resource_group + \u0027--\u0027 +"},{"line_number":60,"context_line":"                      datetime.utcnow().isoformat().lower())"},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            es_engine.indices.create(index\u003dindex_name)"},{"line_number":63,"context_line":"        except es_exc.ConflictError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_c2e0f698","line":60,"range":{"start_line":60,"start_character":40,"end_line":60,"end_character":49},"updated":"2016-03-09 21:19:50.000000000","message":"This is resulting in searchlight--2016-03-09t20:48:00.793834\n\nLet\u0027s use a single dash, lose the milliseconds and the lower(). I would arguably drop the punctuation in the time field to shorten it but i could go either way on that.","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                \u0027alias\u0027: alias_listener}}"},{"line_number":143,"context_line":"        ]"},{"line_number":144,"context_line":"    }"},{"line_number":145,"context_line":"    es_engine.indices.update_aliases(body)"},{"line_number":146,"context_line":"    es_engine.indices.delete(index\u003dindex_name)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_a5c69497","line":145,"range":{"start_line":145,"start_character":22,"end_line":145,"end_character":36},"updated":"2016-03-09 21:19:50.000000000","message":"This raises an error if the index doesn\u0027t exist, which is happening when i\u0027m testing it.","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        ]"},{"line_number":144,"context_line":"    }"},{"line_number":145,"context_line":"    es_engine.indices.update_aliases(body)"},{"line_number":146,"context_line":"    es_engine.indices.delete(index\u003dindex_name)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def normalize_date_fields(document,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_05d7884b","line":146,"range":{"start_line":146,"start_character":22,"end_line":146,"end_character":28},"updated":"2016-03-09 21:19:50.000000000","message":"Make a TODO note to add an option not to do this automatically","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        # we detect this case, we will need to iterate on all indexes"},{"line_number":281,"context_line":"        # indivdually and retry the indexing. We will handle indexing"},{"line_number":282,"context_line":"        # only through the ES bulk() method here."},{"line_number":283,"context_line":"        indexes \u003d self.engine.indices.get_alias(index\u003dself.alias_name_listener)"},{"line_number":284,"context_line":"        for index_name in indexes:"},{"line_number":285,"context_line":"            try:"},{"line_number":286,"context_line":"                if documents:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_c5d640f0","line":283,"range":{"start_line":283,"start_character":54,"end_line":283,"end_character":58},"updated":"2016-03-09 21:19:50.000000000","message":"alias_name_listener doesn\u0027t exist on IndexingHelper","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                err_msg.append(\"id %(_id)s: %(error)s\" % err[\u0027index\u0027])"},{"line_number":330,"context_line":"            LOG.warning(_LW(\u0027Version conflict %s\u0027) % \u0027;\u0027.join(err_msg))"},{"line_number":331,"context_line":"            result \u003d 0"},{"line_number":332,"context_line":"        except es_exc.RequestError:"},{"line_number":333,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":334,"context_line":"            self._index_alias_multiple_indexes_bulk(documents\u003ddocuments,"},{"line_number":335,"context_line":"                                                    versions\u003dversions)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_058028bf","line":332,"range":{"start_line":332,"start_character":22,"end_line":332,"end_character":34},"updated":"2016-03-09 21:19:50.000000000","message":"This still needs error handling","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"fb6598e20bae9409d6deedcfd4ffa2916d6526ca","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                chunk_size\u003dself.index_chunk_size,"},{"line_number":457,"context_line":"                actions\u003dactions)"},{"line_number":458,"context_line":"            LOG.debug(\"Update result: %s\", result)"},{"line_number":459,"context_line":"        except es_exc.RequestError:"},{"line_number":460,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":461,"context_line":"            self._index_alias_multiple_indexes_bulk(actions\u003dactions)"},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_a5ddf4e1","line":459,"range":{"start_line":459,"start_character":22,"end_line":459,"end_character":34},"updated":"2016-03-09 21:19:50.000000000","message":"Needs error handling","commit_id":"f585d2b4c9eb51487c0111c426c825591658cb00"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"c1a29fc22ab456cb5df4dfd39502066d46052105","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        # we detect this case, we will need to iterate on all indexes"},{"line_number":295,"context_line":"        # indivdually and retry the indexing. We will handle indexing"},{"line_number":296,"context_line":"        # only through the ES bulk() method here."},{"line_number":297,"context_line":"        indexes \u003d self.engine.indices.get_alias(index\u003dself.alias_name_listener)"},{"line_number":298,"context_line":"        for index_name in indexes:"},{"line_number":299,"context_line":"            try:"},{"line_number":300,"context_line":"                if documents:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_661e1b0d","line":297,"range":{"start_line":297,"start_character":59,"end_line":297,"end_character":78},"updated":"2016-03-10 18:39:32.000000000","message":"This needs to be .plugins","commit_id":"598cc0b6f8732c34064b339899ff73458310083c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"c1a29fc22ab456cb5df4dfd39502066d46052105","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            result \u003d 0"},{"line_number":346,"context_line":"        except es_exc.RequestError:"},{"line_number":347,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":348,"context_line":"            self._index_alias_multiple_indexes_bulk(documents\u003ddocuments,"},{"line_number":349,"context_line":"                                                    versions\u003dversions)"},{"line_number":350,"context_line":"            result \u003d 0"},{"line_number":351,"context_line":"        LOG.debug(\"Indexing result: %s\", result)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_46b31f0a","line":348,"updated":"2016-03-10 18:39:32.000000000","message":"This MUST log something, because it should only happen in very rare circumstances and if it\u0027s happening more often we need to know why. We also need to make sure it\u0027s firing for the right reasons","commit_id":"598cc0b6f8732c34064b339899ff73458310083c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"dae6fa849af707be5d53cce0a32b0c00b0253fa3","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import copy"},{"line_number":17,"context_line":"from datetime import datetime"},{"line_number":18,"context_line":"from elasticsearch import exceptions as es_exc"},{"line_number":19,"context_line":"from elasticsearch import helpers"},{"line_number":20,"context_line":"import fnmatch"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_d5911754","line":17,"range":{"start_line":17,"start_character":21,"end_line":17,"end_character":29},"updated":"2016-03-14 17:39:13.000000000","message":"This causes errors in other places (like get_now_str) - there\u0027s no reason to change the import.","commit_id":"6ce917a23084dc687017c060f1f1b12892fdb387"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"dae6fa849af707be5d53cce0a32b0c00b0253fa3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    index_name \u003d None"},{"line_number":64,"context_line":"    while not index_name:"},{"line_number":65,"context_line":"        # Use utcnow() to ensure that the name is unique."},{"line_number":66,"context_line":"        index_name \u003d resource_group + \u0027-\u0027 + datetime.utcnow().strftime(FORMAT)"},{"line_number":67,"context_line":"        try:"},{"line_number":68,"context_line":"            es_engine.indices.create(index\u003dindex_name)"},{"line_number":69,"context_line":"        except es_exc.ConflictError:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_f5d253ff","line":66,"range":{"start_line":66,"start_character":53,"end_line":66,"end_character":59},"updated":"2016-03-14 17:39:13.000000000","message":"Use datetime.datetime.utcnow and change the import, or use timeutils.utcnow","commit_id":"6ce917a23084dc687017c060f1f1b12892fdb387"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"100d9af9af080b1caeb63255b103db20ea799005","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            # TODO(ricka) Verify this is the IllegalArgument exception."},{"line_number":539,"context_line":"            LOG.error(_LE(\"Alias [%(alias)s] with multiple indexes error\") %"},{"line_number":540,"context_line":"                      {\u0027alias\u0027: self.alias_name})"},{"line_number":541,"context_line":"            self._index_alias_multiple_indexes_get(id\u003ddoc_id)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def update_document(self, document, doc_id, update_as_script):"},{"line_number":544,"context_line":"        \"\"\"Updates are a little simpler than inserts because the documents"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afc51ec_1e6ef794","line":541,"range":{"start_line":541,"start_character":51,"end_line":541,"end_character":53},"updated":"2016-03-14 20:44:26.000000000","message":"Argument should be doc_id, and needs to return the result","commit_id":"b8491bc97dd84d79f523b3a2a6c088053556fe4e"}]}
