)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"8ee82a8be5d7f571c850f1ca819da8fd8e64965a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"http://specs.openstack.org/openstack/searchlight-specs/specs/mitaka/zero-downtime-reindexing.html"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds more error handling to the Zero Downtime code."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I5591d5208f75015f93b8431e73d2d7c7f5f2e167"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1af94dfe_0f63beb2","line":13,"updated":"2016-03-15 18:04:41.000000000","message":"needs blueprint link","commit_id":"9b9e63fe1bf510317a62d64f6b8b43030867933d"}],"searchlight/cmd/manage.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"e0219a5960fb2e99441ca4bbec52ee8c9a9d1b42","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        for group, search, listen in resource_groups:"},{"line_number":169,"context_line":"            try:"},{"line_number":170,"context_line":"                es_utils.setup_alias(index_names[group], search, listen)"},{"line_number":171,"context_line":"            except Exception as e:"},{"line_number":172,"context_line":"                LOG.error(_LE(\"Failed to setup alias for resource group\""},{"line_number":173,"context_line":"                              \"%(g)s: %(e)s\") % {\u0027g\u0027: group, \u0027e\u0027: e})"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_4525a7a9","line":171,"range":{"start_line":171,"start_character":19,"end_line":171,"end_character":28},"updated":"2016-03-15 18:39:48.000000000","message":"If we silently swallow errors here, what happens next? If the indexing alias is wrong, the actual indexing won\u0027t do the right thing. I don\u0027t know why this is preferable to letting the error bubble up, except that we might want to delete the indices as above.","commit_id":"9b9e63fe1bf510317a62d64f6b8b43030867933d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c0a76bf24fd71b518d7fda8102f0e369618f36d5","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                group_name \u003d plugin_obj.resource_group_name"},{"line_number":155,"context_line":"                plugin_obj.prepare_index(index_name\u003dindex_names[group_name])"},{"line_number":156,"context_line":"        except Exception:"},{"line_number":157,"context_line":"            print(\"Error creating index or mapping, aborting without indexing\")"},{"line_number":158,"context_line":"            es_utils.alias_error_cleanup(index_names, resource_groups)"},{"line_number":159,"context_line":"            raise"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_2507bc1d","line":157,"updated":"2016-03-21 15:06:30.000000000","message":"Why do we print here, but Log on 170?","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8b0fc78b722a858a40042fb05d4c42a471f232b0","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                group_name \u003d plugin_obj.resource_group_name"},{"line_number":155,"context_line":"                plugin_obj.prepare_index(index_name\u003dindex_names[group_name])"},{"line_number":156,"context_line":"        except Exception:"},{"line_number":157,"context_line":"            print(\"Error creating index or mapping, aborting without indexing\")"},{"line_number":158,"context_line":"            es_utils.alias_error_cleanup(index_names, resource_groups)"},{"line_number":159,"context_line":"            raise"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_de581935","line":157,"in_reply_to":"fa0719c6_2507bc1d","updated":"2016-03-22 19:11:55.000000000","message":"I did this for debugging, it should be a LOG.error.","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c0a76bf24fd71b518d7fda8102f0e369618f36d5","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            group_name \u003d plugin_obj.resource_group_name"},{"line_number":180,"context_line":"            try:"},{"line_number":181,"context_line":"                plugin_obj.initial_indexing(index_name\u003dindex_names[group_name])"},{"line_number":182,"context_line":"            except Exception as e:"},{"line_number":183,"context_line":"                LOG.error(_LE(\"Failed to setup index extension \""},{"line_number":184,"context_line":"                              \"%(ext)s: %(e)s\") % {\u0027ext\u0027: ext.name, \u0027e\u0027: e})"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_7074d49b","line":182,"updated":"2016-03-21 15:06:30.000000000","message":"What is the thought around not doing the same alias error cleanup and raising here?","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8b0fc78b722a858a40042fb05d4c42a471f232b0","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            group_name \u003d plugin_obj.resource_group_name"},{"line_number":180,"context_line":"            try:"},{"line_number":181,"context_line":"                plugin_obj.initial_indexing(index_name\u003dindex_names[group_name])"},{"line_number":182,"context_line":"            except Exception as e:"},{"line_number":183,"context_line":"                LOG.error(_LE(\"Failed to setup index extension \""},{"line_number":184,"context_line":"                              \"%(ext)s: %(e)s\") % {\u0027ext\u0027: ext.name, \u0027e\u0027: e})"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_deb139e3","line":182,"in_reply_to":"fa0719c6_7074d49b","updated":"2016-03-22 19:11:55.000000000","message":"I guess in this case, cleaning up will not leave it in a bad state and the user can rerun the command. I\u0027ll add the clean up code.","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"0f034970ff93b4e3e777858eedad42db04874b6b","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            group_name \u003d plugin_obj.resource_group_name"},{"line_number":181,"context_line":"            try:"},{"line_number":182,"context_line":"                plugin_obj.initial_indexing(index_name\u003dindex_names[group_name])"},{"line_number":183,"context_line":"            except Exception as e:"},{"line_number":184,"context_line":"                LOG.error(_LE(\"Failed to setup index extension \""},{"line_number":185,"context_line":"                              \"%(ext)s: %(e)s\") % {\u0027ext\u0027: ext.name, \u0027e\u0027: e})"},{"line_number":186,"context_line":"                es_utils.alias_error_cleanup(index_names, resource_groups)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_2fbbd20f","line":183,"updated":"2016-03-22 18:38:49.000000000","message":"Can you incorporate this change here:\n\nhttps://review.openstack.org/#/c/295108/","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            try:"},{"line_number":185,"context_line":"                es_utils.setup_alias(index_names[group], search, listen)"},{"line_number":186,"context_line":"            except Exception as e:"},{"line_number":187,"context_line":"                LOG.error(_LE(\"Failed to setup alias for resource group\""},{"line_number":188,"context_line":"                              \"%(g)s: %(e)s\") % {\u0027g\u0027: group, \u0027e\u0027: e})"},{"line_number":189,"context_line":"                es_utils.alias_error_cleanup(index_names, resource_groups)"},{"line_number":190,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_424c5170","line":187,"range":{"start_line":187,"start_character":71,"end_line":187,"end_character":72},"updated":"2016-03-25 19:53:53.000000000","message":"Space missing after \u0027group\u0027","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            except Exception as e:"},{"line_number":203,"context_line":"                LOG.error(_LE(\"Failed to setup index extension \""},{"line_number":204,"context_line":"                              \"%(ext)s: %(e)s\") % {\u0027ext\u0027: ext.name, \u0027e\u0027: e})"},{"line_number":205,"context_line":"                es_utils.alias_error_cleanup(index_names, resource_groups)"},{"line_number":206,"context_line":"                raise"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        # Step #4: Update the \"search\" alias."}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_822669b8","line":205,"range":{"start_line":205,"start_character":25,"end_line":205,"end_character":44},"updated":"2016-03-25 19:53:53.000000000","message":"I have a significant concern deleting indices for successfully indexed groups. If (once we allow multiple RGs):\n * swift is successfully indexed into its own index\n * cinder into its own \n * nova (in a third RG) fails\n * neutron (in a fourth) is not attempted\n * ERROR -\u003e delete all three RG indices\n\nWe throw away all the work done for cinder and swift.\n\nMaybe it\u0027s ok not to BEGIN indexing other RGs after one fails (though i think it\u0027d be ok to do as much as possible), but throwing away successful ones i\u0027m not so keen on. An alternative in the above case:\n\n* delete third RG index\n* output a warning that two RGs were indexed, one failed, (and potentially one was not attempted) - you can retry with --type Nova --type Neutron (or the RG name)","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"fc599754a313cff6548f72dc4bbc0201944cecc7","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            except Exception as e:"},{"line_number":203,"context_line":"                LOG.error(_LE(\"Failed to setup index extension \""},{"line_number":204,"context_line":"                              \"%(ext)s: %(e)s\") % {\u0027ext\u0027: ext.name, \u0027e\u0027: e})"},{"line_number":205,"context_line":"                es_utils.alias_error_cleanup(index_names, resource_groups)"},{"line_number":206,"context_line":"                raise"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        # Step #4: Update the \"search\" alias."}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_918875e9","line":205,"range":{"start_line":205,"start_character":25,"end_line":205,"end_character":44},"in_reply_to":"da0c15f0_822669b8","updated":"2016-03-25 23:09:14.000000000","message":"We agreed as part of disabling resource groups per plugin to defer this to Newton.  Here is the BP created.\n\nhttps://blueprints.launchpad.net/searchlight/+spec/reenable-multiple-indices","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"802e262d55279009a0267ea6854d8cf5e4e44752","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                plugin_obj \u003d ext.obj"},{"line_number":170,"context_line":"                group_name \u003d plugin_obj.resource_group_name"},{"line_number":171,"context_line":"                plugin_obj.prepare_index(index_name\u003dindex_names[group_name])"},{"line_number":172,"context_line":"        except Exception:"},{"line_number":173,"context_line":"            LOG.error(_LE(\"Error creating index or mapping, aborting \""},{"line_number":174,"context_line":"                          \"without indexing\"))"},{"line_number":175,"context_line":"            es_utils.alias_error_cleanup(index_names)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_b0b67e3b","line":172,"updated":"2016-03-28 22:20:14.000000000","message":"It would be nice to show the plugin name which failed. The ES error doesn\u0027t provide that context.  For example, if I put a bad type on a mapping, all I get is:\n\n2016-03-28 15:59:51.624 TRACE searchlight ^[[01;35m^[[00mRequestError: TransportError(400, u\u0027MapperParsingException[No handler for type [failme] declared on field [description]]\u0027)\n\nHowever, it is available in some previous log messages, so this definitely is not a blocker:\n\n2016-03-28 16:10:47.196 WARNING elasticsearch [^[[00;36m-] ^[[01;35mPUT /searchlight-2016_03_28_22_10_47/_mapping/OS%3A%3AGlance%3A%3AImage [status:400 request:0.018s]^[[00m","commit_id":"bc9eeaa9bac867eb28c07077fe7ee4cc4af9db5f"}],"searchlight/elasticsearch/plugins/base.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"e0219a5960fb2e99441ca4bbec52ee8c9a9d1b42","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            try:"},{"line_number":148,"context_line":"                self.engine.indices.put_settings(body\u003dindex_settings,"},{"line_number":149,"context_line":"                                                 index\u003dindex_name)"},{"line_number":150,"context_line":"            except Exception as e:"},{"line_number":151,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def setup_index_mapping(self, index_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_85accfee","line":150,"range":{"start_line":150,"start_character":19,"end_line":150,"end_character":28},"updated":"2016-03-15 18:39:48.000000000","message":"Again.. why catch this? If something\u0027s wrong i don\u0027t think we want to silently consume errors.","commit_id":"9b9e63fe1bf510317a62d64f6b8b43030867933d"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"e0219a5960fb2e99441ca4bbec52ee8c9a9d1b42","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                self.engine.indices.put_mapping(index\u003dindex_name,"},{"line_number":160,"context_line":"                                                doc_type\u003ddoc_type,"},{"line_number":161,"context_line":"                                                body\u003dmapping)"},{"line_number":162,"context_line":"            except Exception as e:"},{"line_number":163,"context_line":"                # Log the error and continue to the next doc type."},{"line_number":164,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_c5b6d73c","line":162,"range":{"start_line":162,"start_character":19,"end_line":162,"end_character":28},"updated":"2016-03-15 18:39:48.000000000","message":"Same question","commit_id":"9b9e63fe1bf510317a62d64f6b8b43030867933d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c0a76bf24fd71b518d7fda8102f0e369618f36d5","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            try:"},{"line_number":148,"context_line":"                self.engine.indices.put_settings(body\u003dindex_settings,"},{"line_number":149,"context_line":"                                                 index\u003dindex_name)"},{"line_number":150,"context_line":"            except Exception as e:"},{"line_number":151,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def setup_index_mapping(self, index_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_f0dd8471","line":150,"updated":"2016-03-21 15:06:30.000000000","message":"I agree with Steve on previous patchset.  Probably should let it bubble up to the manage code which catches, cleans up, and raises.","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8b0fc78b722a858a40042fb05d4c42a471f232b0","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            try:"},{"line_number":148,"context_line":"                self.engine.indices.put_settings(body\u003dindex_settings,"},{"line_number":149,"context_line":"                                                 index\u003dindex_name)"},{"line_number":150,"context_line":"            except Exception as e:"},{"line_number":151,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def setup_index_mapping(self, index_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_1e4d713e","line":150,"in_reply_to":"fa0719c6_f0dd8471","updated":"2016-03-22 19:11:55.000000000","message":"Yes, with the new changes that should be the behavior. Fixed.","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c0a76bf24fd71b518d7fda8102f0e369618f36d5","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                self.engine.indices.put_mapping(index\u003dindex_name,"},{"line_number":160,"context_line":"                                                doc_type\u003ddoc_type,"},{"line_number":161,"context_line":"                                                body\u003dmapping)"},{"line_number":162,"context_line":"            except Exception as e:"},{"line_number":163,"context_line":"                # Log the error and continue to the next doc type."},{"line_number":164,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_d0da0078","line":162,"updated":"2016-03-21 15:06:30.000000000","message":"same question","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8b0fc78b722a858a40042fb05d4c42a471f232b0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                self.engine.indices.put_mapping(index\u003dindex_name,"},{"line_number":160,"context_line":"                                                doc_type\u003ddoc_type,"},{"line_number":161,"context_line":"                                                body\u003dmapping)"},{"line_number":162,"context_line":"            except Exception as e:"},{"line_number":163,"context_line":"                # Log the error and continue to the next doc type."},{"line_number":164,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_fe47dd1a","line":162,"in_reply_to":"fa0719c6_d0da0078","updated":"2016-03-22 19:11:55.000000000","message":"Same comment.","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"}],"searchlight/elasticsearch/plugins/utils.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"e0219a5960fb2e99441ca4bbec52ee8c9a9d1b42","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    }"},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        es_engine.indices.update_aliases(body\u003dbody)"},{"line_number":129,"context_line":"    except Exception as e:"},{"line_number":130,"context_line":"        LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":131,"context_line":"        es_engine.indices.delete(index\u003dindex_name, ignore\u003d404)"},{"line_number":132,"context_line":"        es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_85484f2f","line":129,"range":{"start_line":129,"start_character":24,"end_line":129,"end_character":25},"updated":"2016-03-15 18:39:48.000000000","message":"What state is the system left after this? It looks like it\u0027ll delete the new index as well as all the aliases?","commit_id":"9b9e63fe1bf510317a62d64f6b8b43030867933d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c0a76bf24fd71b518d7fda8102f0e369618f36d5","unresolved":false,"context_lines":[{"line_number":230,"context_line":"    #          where or when the error occured, the new indexes may not"},{"line_number":231,"context_line":"    #          have been added to any or all of the aliases."},{"line_number":232,"context_line":"    # TODO(ricka) How should we handle the case where we are deleting the only"},{"line_number":233,"context_line":"    #             index in the alias (i.e. leaving an empty alias)?"},{"line_number":234,"context_line":"    if group_list:"},{"line_number":235,"context_line":"        body \u003d {\u0027actions\u0027: []}"},{"line_number":236,"context_line":"        for group, search, listener in group_list:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_d06fa090","line":233,"updated":"2016-03-21 15:06:30.000000000","message":"Would this happen on the first indexing attempt if it failed?  If so, I guess  go ahead and delete the alias.","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c0a76bf24fd71b518d7fda8102f0e369618f36d5","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        if body[\u0027actions\u0027]:"},{"line_number":262,"context_line":"            # At least one alias had a bad index."},{"line_number":263,"context_line":"            try:"},{"line_number":264,"context_line":"                es_engine.indices.update_aliases(body\u003dbody, ignore\u003d404)"},{"line_number":265,"context_line":"            except Exception as e:"},{"line_number":266,"context_line":"                LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":267,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_5031d0a1","line":264,"updated":"2016-03-21 15:06:30.000000000","message":"If an index is deleted, ES doesn\u0027t automatically remove it from any aliases?","commit_id":"963328fe40ec718b93e57b95aa11f20960c75410"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"267e676494536fa6b8749b8879185ef901250777","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    es_engine \u003d searchlight.elasticsearch.get_api()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    LOG.error(es_engine.indices.get(group + \u0027*\u0027).keys())"},{"line_number":298,"context_line":"    index_list \u003d es_engine.indices.get(\u0027searchlight*\u0027).keys()"},{"line_number":299,"context_line":"    alias_list \u003d es_engine.indices.get_aliases()"},{"line_number":300,"context_line":"    orphan_list \u003d []"},{"line_number":301,"context_line":"    for index in index_list:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_777e7ee5","line":298,"range":{"start_line":298,"start_character":40,"end_line":298,"end_character":51},"updated":"2016-03-25 17:09:07.000000000","message":"Will this always be \u0027searchlight*\u0027 ? I can set resource_group_names to whatever i want","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"a716c18d0d14c65a16b3d3466c85d5a8449685fc","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    es_engine \u003d searchlight.elasticsearch.get_api()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    LOG.error(es_engine.indices.get(group + \u0027*\u0027).keys())"},{"line_number":298,"context_line":"    index_list \u003d es_engine.indices.get(\u0027searchlight*\u0027).keys()"},{"line_number":299,"context_line":"    alias_list \u003d es_engine.indices.get_aliases()"},{"line_number":300,"context_line":"    orphan_list \u003d []"},{"line_number":301,"context_line":"    for index in index_list:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_584c4770","line":298,"range":{"start_line":298,"start_character":40,"end_line":298,"end_character":51},"in_reply_to":"da0c15f0_777e7ee5","updated":"2016-03-25 18:11:58.000000000","message":"Changed. This routine was used for debugging. Based on conversations with you and Travis, I thought this may be a handy routine to hook up to a command line option. That is why I left it around.","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"267e676494536fa6b8749b8879185ef901250777","unresolved":false,"context_lines":[{"line_number":432,"context_line":"    def index_chunk_size(self):"},{"line_number":433,"context_line":"        return 200"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def _verify_alias_exception(self, e):"},{"line_number":436,"context_line":"        \"\"\"Verify that this exception is specifically the IllegalArgument"},{"line_number":437,"context_line":"           exception when there are multiple indexes for an alias. There"},{"line_number":438,"context_line":"           is no clean way of verifying this is the case. There are multiple"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_f723ae03","line":435,"range":{"start_line":435,"start_character":8,"end_line":435,"end_character":31},"updated":"2016-03-25 17:09:07.000000000","message":"This name\u0027s a bit opaque - maybe \u0027is_multiple_alias_exception\u0027\n\nIt also doesn\u0027t need to be in this class. At some stage i\u0027d like to extract the aliasing functions out into their own file","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"a716c18d0d14c65a16b3d3466c85d5a8449685fc","unresolved":false,"context_lines":[{"line_number":432,"context_line":"    def index_chunk_size(self):"},{"line_number":433,"context_line":"        return 200"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def _verify_alias_exception(self, e):"},{"line_number":436,"context_line":"        \"\"\"Verify that this exception is specifically the IllegalArgument"},{"line_number":437,"context_line":"           exception when there are multiple indexes for an alias. There"},{"line_number":438,"context_line":"           is no clean way of verifying this is the case. There are multiple"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_9d189186","line":435,"range":{"start_line":435,"start_character":8,"end_line":435,"end_character":31},"in_reply_to":"da0c15f0_f723ae03","updated":"2016-03-25 18:11:58.000000000","message":"Done.","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"267e676494536fa6b8749b8879185ef901250777","unresolved":false,"context_lines":[{"line_number":450,"context_line":"           the error message string changes in the future. If this happens,"},{"line_number":451,"context_line":"           this check will fail. We need to be vigilant."},{"line_number":452,"context_line":"        \"\"\""},{"line_number":453,"context_line":"        if getattr(e, \u0027error\u0027, None) and (ALIAS_EXCEPTION_STRING in e.error):"},{"line_number":454,"context_line":"            return True"},{"line_number":455,"context_line":"        else:"},{"line_number":456,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_5721bafa","line":453,"range":{"start_line":453,"start_character":64,"end_line":453,"end_character":65},"updated":"2016-03-25 17:09:07.000000000","message":"Not a huge fan of checking error strings because they tend to change but maybe there\u0027s no alternative","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"a716c18d0d14c65a16b3d3466c85d5a8449685fc","unresolved":false,"context_lines":[{"line_number":450,"context_line":"           the error message string changes in the future. If this happens,"},{"line_number":451,"context_line":"           this check will fail. We need to be vigilant."},{"line_number":452,"context_line":"        \"\"\""},{"line_number":453,"context_line":"        if getattr(e, \u0027error\u0027, None) and (ALIAS_EXCEPTION_STRING in e.error):"},{"line_number":454,"context_line":"            return True"},{"line_number":455,"context_line":"        else:"},{"line_number":456,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_f810bb50","line":453,"range":{"start_line":453,"start_character":64,"end_line":453,"end_character":65},"in_reply_to":"da0c15f0_5721bafa","updated":"2016-03-25 18:11:58.000000000","message":"Neither am I. But I couldn\u0027t find a way to differentiate this specific error from the other 400 IllegalArgument errors. I guess I could go snooping in the ES source! If there is a better way, I\u0027m all ears.","commit_id":"5f2e8178ed2356d8e7d7d8ea6a1ddad72b63d94a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def alias_error_cleanup(index_list\u003dNone, group_list\u003dNone):"},{"line_number":207,"context_line":"    \"\"\"While trying to re-index, we ran into some error. In this case, the"},{"line_number":208,"context_line":"       new index creation/alias updating is incorrect. We will need to clean"},{"line_number":209,"context_line":"       up by rolling back all of the changes. ElasticSearch must stay"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_78366b04","line":206,"range":{"start_line":206,"start_character":24,"end_line":206,"end_character":34},"updated":"2016-03-25 19:53:53.000000000","message":"This argument isn\u0027t optional. It\u0027s also documented that it\u0027s a dict, so index_list is a bit misleading","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                     - Listener alias name for the resource group type"},{"line_number":220,"context_line":"    \"\"\""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    if not index_list:"},{"line_number":223,"context_line":"        # We need at least a list of indexes. Nothing to do otherwise."},{"line_number":224,"context_line":"        return"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_180daf3e","line":222,"range":{"start_line":222,"start_character":11,"end_line":222,"end_character":21},"updated":"2016-03-25 19:53:53.000000000","message":"Can remove this if it doesn\u0027t make sense to call with an empty dict","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    #          Remove the new index from each alias. Since we do not know"},{"line_number":230,"context_line":"    #          where or when the error occured, the new indexes may not"},{"line_number":231,"context_line":"    #          have been added to any or all of the aliases."},{"line_number":232,"context_line":"    # TODO(ricka) How should we handle the case where we are deleting the only"},{"line_number":233,"context_line":"    #             index in the alias (i.e. leaving an empty alias)?"},{"line_number":234,"context_line":"    if group_list:"},{"line_number":235,"context_line":"        body \u003d {\u0027actions\u0027: []}"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_629a3516","line":232,"range":{"start_line":232,"start_character":28,"end_line":232,"end_character":29},"updated":"2016-03-25 19:53:53.000000000","message":"I don\u0027t think this is a concern. If the index is broken, something is wrong. The listener may get into a weird state if it\u0027s running but it\u0027ll likely require manual intervention either way\n\nIf the search alias is pointing at it, something\u0027s gone REALLY wrong - that should never happen","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    #          have been added to any or all of the aliases."},{"line_number":232,"context_line":"    # TODO(ricka) How should we handle the case where we are deleting the only"},{"line_number":233,"context_line":"    #             index in the alias (i.e. leaving an empty alias)?"},{"line_number":234,"context_line":"    if group_list:"},{"line_number":235,"context_line":"        body \u003d {\u0027actions\u0027: []}"},{"line_number":236,"context_line":"        for group, search, listener in group_list:"},{"line_number":237,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_af2b962f","line":234,"range":{"start_line":234,"start_character":7,"end_line":234,"end_character":17},"updated":"2016-03-25 19:53:53.000000000","message":"I don\u0027t think explicitly deleting aliases is necessary. If an index is deleted I believe (based on some experimentation) that e-s will clean up any alias references to it.","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            try:"},{"line_number":238,"context_line":"                search_indexes \u003d es_engine.indices.get_alias(name\u003dsearch,"},{"line_number":239,"context_line":"                                                             ignore\u003d404)"},{"line_number":240,"context_line":"                if index_list[group] in search_indexes:"},{"line_number":241,"context_line":"                    body[\u0027actions\u0027].insert(0, {\u0027remove\u0027: {"},{"line_number":242,"context_line":"                                               \u0027index\u0027: index_list[group],"},{"line_number":243,"context_line":"                                               \u0027alias\u0027: search}})"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_ac87240e","line":240,"range":{"start_line":240,"start_character":30,"end_line":240,"end_character":35},"updated":"2016-03-25 19:53:53.000000000","message":"Is group definitely going to be in index_list? If there are legit reasons it might not be, .get() is safer","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    # Step 2: Index Clean-up."},{"line_number":269,"context_line":"    #         The indexes have been removed from the appropriate aliases."},{"line_number":270,"context_line":"    #         Now we are able to delete these unused indexes."},{"line_number":271,"context_line":"    for key in index_list.keys():"},{"line_number":272,"context_line":"        try:"},{"line_number":273,"context_line":"            es_engine.indices.delete(index\u003dindex_list[key], ignore\u003d404)"},{"line_number":274,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_6fa69ec2","line":271,"range":{"start_line":271,"start_character":12,"end_line":271,"end_character":14},"updated":"2016-03-25 19:53:53.000000000","message":"It\u0027s considered more standard if you need the values to use iteritems()\n\nfor resource_group, index_name in index_list.iteritems()\n\nSince the key is only being used to look up the value you could also use \n\nfor index_name in index_list.values()","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        we could define alias/index creation and orphan cleanup to be a"},{"line_number":289,"context_line":"        critical section and protect them with a semaphore."},{"line_number":290,"context_line":"    \"\"\""},{"line_number":291,"context_line":"    if not group:"},{"line_number":292,"context_line":"        # Cannot allow a search of \u0027*\u0027. Finds all indices, too dangerous."},{"line_number":293,"context_line":"        return"},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_6f94de36","line":291,"range":{"start_line":291,"start_character":11,"end_line":291,"end_character":16},"updated":"2016-03-25 19:53:53.000000000","message":"How about group\u003d\u0027*\u0027 ? :)","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    def index_chunk_size(self):"},{"line_number":432,"context_line":"        return 200"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def _is_multiple_alias_exception(self, e):"},{"line_number":435,"context_line":"        \"\"\"Verify that this exception is specifically the IllegalArgument"},{"line_number":436,"context_line":"           exception when there are multiple indexes for an alias. There"},{"line_number":437,"context_line":"           is no clean way of verifying this is the case. There are multiple"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_cfe7eae2","line":434,"range":{"start_line":434,"start_character":8,"end_line":434,"end_character":36},"updated":"2016-03-25 19:53:53.000000000","message":"Function doesn\u0027t need to be part of IndexHelper","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":443,"context_line":"               than one indices associated with it [[idx1, idx2]], can\u0027t"},{"line_number":444,"context_line":"               execute a single index op]"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"           We will be dirty and parse the exception message. In particular"},{"line_number":447,"context_line":"           the substring \"has more than one indices associated with it\""},{"line_number":448,"context_line":"           will be looked for. The uncleanliness will manifest itself if the"},{"line_number":449,"context_line":"           the error message string changes in the future. If this happens,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_2f4786bc","line":446,"range":{"start_line":446,"start_character":38,"end_line":446,"end_character":41},"updated":"2016-03-25 19:53:53.000000000","message":"Replace this paragraph with \u0027ALIAS_EXCEPTION_STRING\u0027 should be checked for accuracy with future server versions. Also, this is a case where functional tests are very useful since they run on a real server","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3f4eada5619e64e22e47ef0405387c03ba201feb","unresolved":false,"context_lines":[{"line_number":449,"context_line":"           the error message string changes in the future. If this happens,"},{"line_number":450,"context_line":"           this check will fail. We need to be vigilant."},{"line_number":451,"context_line":"        \"\"\""},{"line_number":452,"context_line":"        if getattr(e, \u0027error\u0027, None) and (ALIAS_EXCEPTION_STRING in e.error):"},{"line_number":453,"context_line":"            return True"},{"line_number":454,"context_line":"        else:"},{"line_number":455,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_6f65fe43","line":452,"range":{"start_line":452,"start_character":22,"end_line":452,"end_character":23},"updated":"2016-03-25 19:53:53.000000000","message":"Shorten to:\nif ALIAS_EXCEPTION_STRING in getattr(e, \u0027error\u0027, \u0027\u0027):","commit_id":"48863a54fec18d5835b77132b10256db3dca6bbb"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3c14d15aa800dd50cab8d26ac3048a674a4fdb41","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        except Exception as e:"},{"line_number":112,"context_line":"            LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":113,"context_line":"            es_engine.indices.delete(index\u003dindex_name)"},{"line_number":114,"context_line":"            es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"},{"line_number":115,"context_line":"                                           name\u003dalias_search)"},{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_acc0fbe1","line":114,"range":{"start_line":114,"start_character":30,"end_line":114,"end_character":42},"updated":"2016-03-28 17:12:24.000000000","message":"I think this line can be removed? If indices are deleted, references in aliases will be removed also","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"eaeaf7170c50e769aeced7b476e2aa0706a724f5","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        except Exception as e:"},{"line_number":112,"context_line":"            LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":113,"context_line":"            es_engine.indices.delete(index\u003dindex_name)"},{"line_number":114,"context_line":"            es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"},{"line_number":115,"context_line":"                                           name\u003dalias_search)"},{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_496ae61b","line":114,"range":{"start_line":114,"start_character":30,"end_line":114,"end_character":42},"in_reply_to":"ba0121b8_acc0fbe1","updated":"2016-03-28 20:27:50.000000000","message":"It is redundant. Being redundant we can remove the code by deleting it.","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3c14d15aa800dd50cab8d26ac3048a674a4fdb41","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    except Exception as e:"},{"line_number":130,"context_line":"        LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":131,"context_line":"        es_engine.indices.delete(index\u003dindex_name, ignore\u003d404)"},{"line_number":132,"context_line":"        es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"},{"line_number":133,"context_line":"                                       name\u003dalias_search, ignore\u003d404)"},{"line_number":134,"context_line":"        es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"},{"line_number":135,"context_line":"                                       name\u003dalias_listener, ignore\u003d404)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_8caa5718","line":132,"range":{"start_line":132,"start_character":39,"end_line":132,"end_character":44},"updated":"2016-03-28 17:12:24.000000000","message":"As above - i think we determined that it is not necessary to delete aliases explicitly","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"eaeaf7170c50e769aeced7b476e2aa0706a724f5","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    except Exception as e:"},{"line_number":130,"context_line":"        LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":131,"context_line":"        es_engine.indices.delete(index\u003dindex_name, ignore\u003d404)"},{"line_number":132,"context_line":"        es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"},{"line_number":133,"context_line":"                                       name\u003dalias_search, ignore\u003d404)"},{"line_number":134,"context_line":"        es_engine.indices.delete_alias(index\u003d\u0027_all\u0027,"},{"line_number":135,"context_line":"                                       name\u003dalias_listener, ignore\u003d404)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_a9774201","line":132,"range":{"start_line":132,"start_character":39,"end_line":132,"end_character":44},"in_reply_to":"ba0121b8_8caa5718","updated":"2016-03-28 20:27:50.000000000","message":"Gone.","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3c14d15aa800dd50cab8d26ac3048a674a4fdb41","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    try:"},{"line_number":172,"context_line":"        es_engine.indices.update_aliases(body)"},{"line_number":173,"context_line":"    except Exception:"},{"line_number":174,"context_line":"        return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    return old_index"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_2c5b4b56","line":174,"range":{"start_line":174,"start_character":15,"end_line":174,"end_character":19},"updated":"2016-03-28 17:12:24.000000000","message":"I\u0027m not sure what state the system\u0027s in after this. It\u0027s possible searching is still referring to the old index, so we certainly don\u0027t want to pretend everything is ok","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"eaeaf7170c50e769aeced7b476e2aa0706a724f5","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    try:"},{"line_number":172,"context_line":"        es_engine.indices.update_aliases(body)"},{"line_number":173,"context_line":"    except Exception:"},{"line_number":174,"context_line":"        return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    return old_index"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_295a1284","line":174,"range":{"start_line":174,"start_character":15,"end_line":174,"end_character":19},"in_reply_to":"ba0121b8_2c5b4b56","updated":"2016-03-28 20:27:50.000000000","message":"Log the error and stop. Commented why.","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3c14d15aa800dd50cab8d26ac3048a674a4fdb41","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    # If the index no longer exists, ignore and continue."},{"line_number":196,"context_line":"    try:"},{"line_number":197,"context_line":"        es_engine.indices.update_aliases(body\u003dbody, ignore\u003d404)"},{"line_number":198,"context_line":"        es_engine.indices.delete(index\u003dindex_name, ignore\u003d404)"},{"line_number":199,"context_line":"    except Exception as e:"},{"line_number":200,"context_line":"        # If the exception happens with the update, the alias may"},{"line_number":201,"context_line":"        # still refer to the index. We do not want to delete the"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_52f9f4c7","line":198,"range":{"start_line":198,"start_character":26,"end_line":198,"end_character":32},"updated":"2016-03-28 17:12:24.000000000","message":"This wasn\u0027t added in this patch, but it occurs that this function could be entirely replaced with a delete index call which will automatically delete the listener alias. The name of this function\u0027s a little confusing since it is essentially deleting the index","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"eaeaf7170c50e769aeced7b476e2aa0706a724f5","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    # If the index no longer exists, ignore and continue."},{"line_number":196,"context_line":"    try:"},{"line_number":197,"context_line":"        es_engine.indices.update_aliases(body\u003dbody, ignore\u003d404)"},{"line_number":198,"context_line":"        es_engine.indices.delete(index\u003dindex_name, ignore\u003d404)"},{"line_number":199,"context_line":"    except Exception as e:"},{"line_number":200,"context_line":"        # If the exception happens with the update, the alias may"},{"line_number":201,"context_line":"        # still refer to the index. We do not want to delete the"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba0121b8_49514662","line":198,"range":{"start_line":198,"start_character":26,"end_line":198,"end_character":32},"in_reply_to":"ba0121b8_52f9f4c7","updated":"2016-03-28 20:27:50.000000000","message":"I\u0027ll submit a new defect for fixing this, instead of bloating this patch.","commit_id":"b9ddb257fb2ed6848e1a3ea3a3b083bc9cabd512"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"802e262d55279009a0267ea6854d8cf5e4e44752","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                        name\u003dalias_listener)"},{"line_number":111,"context_line":"        except Exception as e:"},{"line_number":112,"context_line":"            LOG.error(encodeutils.exception_to_unicode(e))"},{"line_number":113,"context_line":"            es_engine.indices.delete(index\u003dindex_name)"},{"line_number":114,"context_line":"            raise"},{"line_number":115,"context_line":"        return"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_907c1a22","line":113,"updated":"2016-03-28 22:20:14.000000000","message":"Putting a comment in here about this taking care of alias deletion with info about the thing discussed in chat wouldn\u0027t hurt.","commit_id":"bc9eeaa9bac867eb28c07077fe7ee4cc4af9db5f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"802e262d55279009a0267ea6854d8cf5e4e44752","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    if ALIAS_EXCEPTION_STRING in getattr(e, \u0027error\u0027, \u0027\u0027):"},{"line_number":240,"context_line":"        return True"},{"line_number":241,"context_line":"    else:"},{"line_number":242,"context_line":"        return False"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def normalize_date_fields(document,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_90f89a7e","line":242,"updated":"2016-03-28 22:20:14.000000000","message":"Definitely need a test case to keep us in check on this, so that if it ever changes we\u0027ll find this right away.","commit_id":"bc9eeaa9bac867eb28c07077fe7ee4cc4af9db5f"}]}
