)]}'
{"monasca_notification/common/repositories/mysql/mysql_repo.py":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"57690eba510385c9d9a32496125c5060c6424cf3","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_f384250c","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"updated":"2016-08-03 22:00:15.000000000","message":"This exception maps to multiple mysql errors. This should be more specific in what it catches if it is going to ignore the error. There should be an argument to the exception that provides the mysql error number","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"9e268d9818731b363c911502c3461b8f85862c13","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_d35f6173","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"in_reply_to":"bacf61ea_5326d116","updated":"2016-08-03 22:05:55.000000000","message":"These are the mappings for IntegrityError\n\nmap_error(IntegrityError, ER.DUP_ENTRY, ER.NO_REFERENCED_ROW,\n       ER.NO_REFERENCED_ROW_2, ER.ROW_IS_REFERENCED, ER.ROW_IS_REFERENCED_2,\n       ER.CANNOT_ADD_FOREIGN, ER.BAD_NULL_ERROR)","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"511cecd0117401d2d5625d0b4065ed152a8fed54","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_18c60a68","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"in_reply_to":"bacf61ea_6e1b2ecb","updated":"2016-08-04 15:43:57.000000000","message":"Done","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"94d10a9a3b72e66a20d0069322575ba8cffbd2e5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_6e1b2ecb","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"in_reply_to":"bacf61ea_6ebfaeaa","updated":"2016-08-03 22:39:27.000000000","message":"This is more of a future proofing addition. We may (and as far as I know, do) plan on changing this table later, so being as specific as possible prevents other errors later.","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"85e87f2f21e581f607174b9bd03260f2ca3b05cc","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_6ebfaeaa","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"in_reply_to":"bacf61ea_8e62e2d6","updated":"2016-08-03 22:35:08.000000000","message":"I can do that. But the code will be too low level. I hardly see any mysql code making decision based on the error codes","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"0ec7e273cc6da6011ead3515e8447a7f54a29866","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_8e62e2d6","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"in_reply_to":"bacf61ea_d35f6173","updated":"2016-08-03 22:21:44.000000000","message":"Because we\u0027re ignoring the error, I think it would be best to be as specific as possible. We only care about the duplicate key error here, as far as I can tell.","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"a996b7916572be68d2c23ad33c339394ab240930","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            cur \u003d self._mysql.cursor()"},{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignore:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # using ansible or some other tools at the same time, then this will occur"},{"line_number":114,"context_line":"            log.exception(\"Couldn\u0027t insert notification types %s  , \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_5326d116","line":111,"range":{"start_line":111,"start_character":15,"end_line":111,"end_character":48},"in_reply_to":"bacf61ea_f384250c","updated":"2016-08-03 22:05:02.000000000","message":"All of them are type of Integrity error. Do we really need to distinguish between Integrity error. BTW I got\n\nIntegrityError: (1062, u\"Duplicate entry \u0027PAGERDUTY\u0027 for key \u0027PRIMARY\u0027\")","commit_id":"864b903eb22d2127a169b97ae3afe1eca597d7ef"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"900d5d17d7c960e9412b24b7e368b521661bf80a","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s  , \""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_e6ef84ae","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":70},"updated":"2016-08-08 19:07:49.000000000","message":"What is the %s supposed to be? The message makes it look like it should be notification_types, but instead it is the exception? And why the extra spaces after the %s?","commit_id":"ceaf0dcb2edec1b4e274b788f0157f864f626e71"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"13d94151f9ea8a2e28b4ccc5bdff1ee280c50415","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s  , \""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_77cfbcb0","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":70},"in_reply_to":"9ad45d7e_0ce637b4","updated":"2016-08-08 20:09:08.000000000","message":"Everywhere in the code it is %s.  So I went with consistency.","commit_id":"ceaf0dcb2edec1b4e274b788f0157f864f626e71"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"762b89811ef58042866fa44c3cd535c6e812b998","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s  , \""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_77b05cf5","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":70},"in_reply_to":"9ad45d7e_77cfbcb0","updated":"2016-08-08 20:11:56.000000000","message":"Hi Haneef, can you answer my questions?","commit_id":"ceaf0dcb2edec1b4e274b788f0157f864f626e71"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"b2f5044e08b3f8a5b5961d75aa39c07ee25a8786","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s  , \""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_f7744cfe","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":70},"in_reply_to":"9ad45d7e_e6ef84ae","updated":"2016-08-08 20:16:30.000000000","message":"It print the exception details.  You can look at line 101, 121 etc. All of them use the same syntax. So I was just being consistent","commit_id":"ceaf0dcb2edec1b4e274b788f0157f864f626e71"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"f496ed290d7aa3a859b584d4c24eaf7a22e8ca27","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s  , \""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_0ce637b4","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":70},"in_reply_to":"9ad45d7e_e6ef84ae","updated":"2016-08-08 19:54:28.000000000","message":"Looking at this again, I think it should probably be a string format instead of using %, for forward compatibility with python 3","commit_id":"ceaf0dcb2edec1b4e274b788f0157f864f626e71"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"2c26b1085b52485b525fed06b0b8c542fa9d1026","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s  , \""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_d2e79610","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":70},"in_reply_to":"9ad45d7e_f7744cfe","updated":"2016-08-08 21:01:44.000000000","message":"Ok. Why the extra blanks?","commit_id":"ceaf0dcb2edec1b4e274b788f0157f864f626e71"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"3d51c6fe55f16f511b58cebec0621d4d279e08cc","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s\""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_2f184884","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":29},"updated":"2016-08-08 22:39:20.000000000","message":"Logging this as an exception when it is expected could be confusing for users. Perhaps logging as info would be better?","commit_id":"ba53478bd25721a0fa5d8fe1a12eef8eadc24b4f"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"b16911210c8795564a425f67cb85f079f742b692","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s\""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_b572c2e3","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":29},"in_reply_to":"9ad45d7e_2f184884","updated":"2016-08-09 02:35:56.000000000","message":"I think info might even be too high since it should happen on every initial start.  This sounds like a scary problem but since it is completely expected I\u0027d be ok with debug.\n\nIf we leave it at info I\u0027d remove the ambiguity from the log message.  I\u0027d say something like \"Notification types %s already exist\".  Having a log message that says \"Most probably\" wouldn\u0027t give me a warm fuzzy feeling.","commit_id":"ba53478bd25721a0fa5d8fe1a12eef8eadc24b4f"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"bc73b6c241769738a15fe96ccb93349a97265b5c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s\""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_dba821de","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":29},"in_reply_to":"9ad45d7e_2f184884","updated":"2016-08-09 15:36:26.000000000","message":"The message exist in notification processor from where this is called.\n\nhttps://github.com/openstack/monasca-notification/blob/master/monasca_notification/processors/notification_processor.py#L42","commit_id":"ba53478bd25721a0fa5d8fe1a12eef8eadc24b4f"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"648e5f56ff8fc75e0632a241d351236733917180","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            code, _ \u003d ignore.args"},{"line_number":115,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":116,"context_line":"                log.exception(\"Couldn\u0027t insert notification types %s\""},{"line_number":117,"context_line":"                              \"Most probably other instance would have inserted. Ignoring\", ignore)"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignore)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_702154fb","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":29},"in_reply_to":"9ad45d7e_b572c2e3","updated":"2016-08-09 15:33:26.000000000","message":"It won\u0027t happen on every start. Only the first start when there is no notification types  in the table. I will change this to info, since mostly we won\u0027t even enable debug","commit_id":"ba53478bd25721a0fa5d8fe1a12eef8eadc24b4f"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"1049c8b5b5cc2d396ab89fa7385ebb3c4b20db3c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"},{"line_number":116,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":117,"context_line":"                log.info(\"Notification type exists in DB. Ignoring the exception  {}\".format(mesg))"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignoredException)"},{"line_number":120,"context_line":"        except pymysql.Error as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_4f6e2630","line":117,"range":{"start_line":117,"start_character":20,"end_line":117,"end_character":24},"updated":"2016-08-09 18:24:00.000000000","message":"This should be a debug.  Info is not an unreasonable log setting and this doesn\u0027t give any actionable information to a customer.  Setting the log level to debug you would expect to see messages like this talking about how the internals are working.","commit_id":"ab4a12f69417ced2857b5df608bfca15a7732e9b"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"82f819ffe9a97603b5a930b2e81f0d3156445f50","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"},{"line_number":116,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"},{"line_number":117,"context_line":"                log.info(\"Notification type exists in DB. Ignoring the exception  {}\".format(mesg))"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                raise exc.DatabaseException(ignoredException)"},{"line_number":120,"context_line":"        except pymysql.Error as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_ee5a7b4f","line":117,"range":{"start_line":117,"start_character":20,"end_line":117,"end_character":24},"in_reply_to":"9ad45d7e_4f6e2630","updated":"2016-08-09 19:20:31.000000000","message":"Done","commit_id":"ab4a12f69417ced2857b5df608bfca15a7732e9b"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"769d27fa1b97ef1902866767bc6430190e0d2249","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignoredException:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_23c5c15a","line":112,"range":{"start_line":112,"start_character":38,"end_line":112,"end_character":46},"updated":"2016-08-10 01:09:09.000000000","message":"instances","commit_id":"96f3bb6038f2815e6c0105d8a905e9e0b9b49dc7"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"769d27fa1b97ef1902866767bc6430190e0d2249","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignoredException:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"},{"line_number":116,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_43a1d5a2","line":113,"range":{"start_line":112,"start_character":0,"end_line":113,"end_character":86},"updated":"2016-08-10 01:09:09.000000000","message":"This might sound better -\n\nIf multiple instances of the notification service are started at the same time this will occur.\n\nWould this happen in postgres as well? Should we address this change in that file","commit_id":"96f3bb6038f2815e6c0105d8a905e9e0b9b49dc7"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"687fbb03e714319d430fff314bb6d3df31e8349e","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignoredException:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"},{"line_number":116,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_39bb2e29","line":113,"range":{"start_line":112,"start_character":0,"end_line":113,"end_character":86},"in_reply_to":"9ad45d7e_1e00d0a9","updated":"2016-08-10 01:59:20.000000000","message":"Changed the comments","commit_id":"96f3bb6038f2815e6c0105d8a905e9e0b9b49dc7"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"991743a66cb2207b19135b6579c8adc9d08c4637","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignoredException:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"},{"line_number":116,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_7e9c6cc0","line":113,"range":{"start_line":112,"start_character":0,"end_line":113,"end_character":86},"in_reply_to":"9ad45d7e_43a1d5a2","updated":"2016-08-10 01:26:45.000000000","message":"one more thought maybe add in there if multiple instances of the notification service are started at the same time configured to talk to the same mysql instance this will occur.","commit_id":"96f3bb6038f2815e6c0105d8a905e9e0b9b49dc7"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"9a24d56000a1d097dd3fb35d5078607dc7ebe7c4","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            cur.executemany(self._insert_notification_types_sql, notification_types)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        except pymysql.IntegrityError as ignoredException:"},{"line_number":112,"context_line":"            # If we are starting many instance of notification service in many servers"},{"line_number":113,"context_line":"            # at the same time using ansible or some other tools, then this will occur"},{"line_number":114,"context_line":"            # This may happen only during first time start when the tables are empty."},{"line_number":115,"context_line":"            code, mesg \u003d ignoredException.args"},{"line_number":116,"context_line":"            if code \u003d\u003d pymysql.constants.ER.DUP_ENTRY:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_1e00d0a9","line":113,"range":{"start_line":112,"start_character":0,"end_line":113,"end_character":86},"in_reply_to":"9ad45d7e_7e9c6cc0","updated":"2016-08-10 01:33:32.000000000","message":"Might be easiest just to specify multiple instances of the notification engine will try to write at the same time and only one of them is viable.\n\nThe default config in devstack is to launch two notification engines so this is something that should almost always be possible.\n\nI also agree about the postgres problem.  We probably need a patch for that as well but I\u0027d be ok with getting that in a different patch set since I think that will take a little more time to be able to test.","commit_id":"96f3bb6038f2815e6c0105d8a905e9e0b9b49dc7"}]}
