)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"0931b06eda7c66c84e00697f26464302fedbcfc5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cabhishek.kekane@nttdata.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-22 05:36:31 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DB purge command fails due to FK constraint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027cinder-manage db purge\u0027 command fails with DBReferenceError due"},{"line_number":10,"context_line":"to FK constraint failure and exits with stacktrace on the console."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa0719c6_6032f411","line":7,"updated":"2016-03-22 21:19:59.000000000","message":"This summary doesn\u0027t really describe what this change does.  It states something that\u0027s true both before and after the change.","commit_id":"5e12efc17a228fdb49db259320fd3e57ab258e0a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"433cb02183b55bad73185c3a8ded7a5522c53af0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cabhishek.kekane@nttdata.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-22 05:36:31 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DB purge command fails due to FK constraint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027cinder-manage db purge\u0027 command fails with DBReferenceError due"},{"line_number":10,"context_line":"to FK constraint failure and exits with stacktrace on the console."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa0719c6_0a386bee","line":7,"in_reply_to":"fa0719c6_6032f411","updated":"2016-03-23 05:57:41.000000000","message":"Hi Eric,\n\nI will update the summary to give clear information.","commit_id":"5e12efc17a228fdb49db259320fd3e57ab258e0a"}],"cinder/cmd/manage.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"608fc8b277e60d641b3502b595745ade477c5943","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":232,"context_line":"        # if purge_deleted_rows() fails to delete some rows we"},{"line_number":233,"context_line":"        # get non-zero exit_code"},{"line_number":234,"context_line":"        sys.exit(db.purge_deleted_rows(ctxt, age_in_days))"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"class VersionCommands(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_3f6883ba","line":234,"updated":"2016-03-11 11:02:07.000000000","message":"It\u0027s not a python way to return exit coder from function. Please, use exceptions instead of and catch them here","commit_id":"fc5c35f670df1190bd1e13432d8543582acd6ef5"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"891bc53f121cec289d4422b9306c0146f5269f6d","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        if ret_code:"},{"line_number":235,"context_line":"            print(_(\u0027Purge command completed partially, check logs \u0027"},{"line_number":236,"context_line":"                    \u0027for more details\u0027))"},{"line_number":237,"context_line":"            sys.exit(ret_code)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_695482c9","line":236,"range":{"start_line":236,"start_character":37,"end_line":236,"end_character":40},"updated":"2016-03-17 17:42:41.000000000","message":"\u0027.\u0027 at EOL","commit_id":"0c292e6b4dc6ca67000a9a43039426067f923129"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"99057b806410f38d5e05894a6ea6b6940383b657","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        if ret_code:"},{"line_number":235,"context_line":"            print(_(\u0027Purge command completed partially, check logs \u0027"},{"line_number":236,"context_line":"                    \u0027for more details\u0027))"},{"line_number":237,"context_line":"            sys.exit(ret_code)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_50ce095b","line":236,"range":{"start_line":236,"start_character":37,"end_line":236,"end_character":40},"in_reply_to":"1af94dfe_695482c9","updated":"2016-03-21 07:20:20.000000000","message":"Done","commit_id":"0c292e6b4dc6ca67000a9a43039426067f923129"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"179d66368529d310497b235416538ff0a45d7576","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            db.purge_deleted_rows(ctxt, age_in_days)"},{"line_number":236,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":237,"context_line":"            print(_(\"Purge command failed, check logs \""},{"line_number":238,"context_line":"                    \"for more details.\"))"},{"line_number":239,"context_line":"            sys.exit(1)"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_df02133e","line":237,"updated":"2016-03-21 14:26:22.000000000","message":"This should specifically say to check the cinder-manage log, right?","commit_id":"7f9477953c340d7e57bec45d2d186b476cbc44f7"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"608fc8b277e60d641b3502b595745ade477c5943","unresolved":false,"context_lines":[{"line_number":4277,"context_line":"                        {\u0027tablename\u0027: table, \u0027error\u0027: six.text_type(ex)})"},{"line_number":4278,"context_line":"            # EX_TEMPFAIL means a temporary failure occurred and user is"},{"line_number":4279,"context_line":"            # invited to retry."},{"line_number":4280,"context_line":"            exit_code \u003d os.EX_TEMPFAIL"},{"line_number":4281,"context_line":""},{"line_number":4282,"context_line":"        rows_purged \u003d result.rowcount"},{"line_number":4283,"context_line":"        LOG.info(_LI(\"Deleted %(row)d rows from table\u003d%(table)s\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_ffa45b09","line":4280,"updated":"2016-03-11 11:02:07.000000000","message":"IMO, DB API code should not know anything about system exit codes","commit_id":"fc5c35f670df1190bd1e13432d8543582acd6ef5"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"d47435fa0674cc4a37b02e2936618927aa42b9e7","unresolved":false,"context_lines":[{"line_number":4271,"context_line":"            # A foreign key constraint keeps us from deleting some of"},{"line_number":4272,"context_line":"            # these rows until we clean up a dependent table. Just"},{"line_number":4273,"context_line":"            # skip this table for now; we\u0027ll come back to it later."},{"line_number":4274,"context_line":"            LOG.warning(_LW(\"IntegrityError detected when archiving table \""},{"line_number":4275,"context_line":"                            \"%(tablename)s: %(error)s\"),"},{"line_number":4276,"context_line":"                        {\u0027tablename\u0027: table, \u0027error\u0027: six.text_type(ex)})"},{"line_number":4277,"context_line":"            # return 1 to notify admin that purge command completed partially"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_722aa291","line":4274,"updated":"2016-03-17 20:36:56.000000000","message":"This code should be leaved as is. It\u0027s not pythonic to return exit code, you have to use exception instead. Please, add try-except statement into the cinder/cmd/manage.py and exit with needed code","commit_id":"0c292e6b4dc6ca67000a9a43039426067f923129"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"99057b806410f38d5e05894a6ea6b6940383b657","unresolved":false,"context_lines":[{"line_number":4271,"context_line":"            # A foreign key constraint keeps us from deleting some of"},{"line_number":4272,"context_line":"            # these rows until we clean up a dependent table. Just"},{"line_number":4273,"context_line":"            # skip this table for now; we\u0027ll come back to it later."},{"line_number":4274,"context_line":"            LOG.warning(_LW(\"IntegrityError detected when archiving table \""},{"line_number":4275,"context_line":"                            \"%(tablename)s: %(error)s\"),"},{"line_number":4276,"context_line":"                        {\u0027tablename\u0027: table, \u0027error\u0027: six.text_type(ex)})"},{"line_number":4277,"context_line":"            # return 1 to notify admin that purge command completed partially"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_b0db251b","line":4274,"in_reply_to":"1af94dfe_722aa291","updated":"2016-03-21 07:20:20.000000000","message":"Done","commit_id":"0c292e6b4dc6ca67000a9a43039426067f923129"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"1a8955f60bfbc8273feea070aad1f95f64bad7bb","unresolved":false,"context_lines":[{"line_number":4266,"context_line":"                    t.delete()"},{"line_number":4267,"context_line":"                    .where(t.c.deleted_at \u003c deleted_age))"},{"line_number":4268,"context_line":"        except db_exc.DBReferenceError as ex:"},{"line_number":4269,"context_line":"            LOG.error(_LE(\u0027DBError detected when purging from \u0027"},{"line_number":4270,"context_line":"                          \u0027%(tablename)s: %(error)s.\u0027),"},{"line_number":4271,"context_line":"                      {\u0027tablename\u0027: table, \u0027error\u0027: six.text_type(ex)})"},{"line_number":4272,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_64eea8b5","line":4269,"updated":"2016-03-22 12:33:06.000000000","message":"Why did you replaced LOG.exception with LOG.error?","commit_id":"5e12efc17a228fdb49db259320fd3e57ab258e0a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"433cb02183b55bad73185c3a8ded7a5522c53af0","unresolved":false,"context_lines":[{"line_number":4266,"context_line":"                    t.delete()"},{"line_number":4267,"context_line":"                    .where(t.c.deleted_at \u003c deleted_age))"},{"line_number":4268,"context_line":"        except db_exc.DBReferenceError as ex:"},{"line_number":4269,"context_line":"            LOG.error(_LE(\u0027DBError detected when purging from \u0027"},{"line_number":4270,"context_line":"                          \u0027%(tablename)s: %(error)s.\u0027),"},{"line_number":4271,"context_line":"                      {\u0027tablename\u0027: table, \u0027error\u0027: six.text_type(ex)})"},{"line_number":4272,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_0a518b36","line":4269,"in_reply_to":"fa0719c6_64eea8b5","updated":"2016-03-23 05:57:41.000000000","message":"Hi Ivan,\n\nLOG.exception is logging stack-trace as well, IMO which is of no use in this case. LOG.error is logging only relevant error message which gives clear cause of failure.\n\nPlease refer http://paste.openstack.org/show/491530/ in which I have added both the messages.","commit_id":"5e12efc17a228fdb49db259320fd3e57ab258e0a"}]}
