)]}'
{"barbican/api/app.py":[{"author":{"_account_id":17579,"name":"Elvin Tubillara","email":"edtubill@us.ibm.com","username":"edtubill"},"change_message_id":"569dc8b2cb76124bb99514732a46aae7c8f271b5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        hooks\u003drequest_hooks,"},{"line_number":63,"context_line":"        force_canonical\u003dFalse"},{"line_number":64,"context_line":"    )"},{"line_number":65,"context_line":"    # clear the session created in controller initialization     60"},{"line_number":66,"context_line":"    repositories.clear()"},{"line_number":67,"context_line":"    return wsgi_app"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba63e191_15489a5a","line":65,"range":{"start_line":65,"start_character":64,"end_line":65,"end_character":67},"updated":"2016-01-20 05:16:09.000000000","message":"One minor question, what does that \"60\" mean?","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"a735cc37ceec18d0cd3f359f60b224be6e40adc0","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        hooks\u003drequest_hooks,"},{"line_number":63,"context_line":"        force_canonical\u003dFalse"},{"line_number":64,"context_line":"    )"},{"line_number":65,"context_line":"    # clear the session created in controller initialization     60"},{"line_number":66,"context_line":"    repositories.clear()"},{"line_number":67,"context_line":"    return wsgi_app"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba63e191_555b7254","line":65,"range":{"start_line":65,"start_character":64,"end_line":65,"end_character":67},"in_reply_to":"ba63e191_15489a5a","updated":"2016-01-20 05:49:44.000000000","message":"Seems to me that this was copied from gerrit, so it must be a line number. Anyway, I didn\u0027t want to block cause of a nit. The author is free to choose if he wants to address this, if this just gets merged, then one of us could submit a subsequent patch just fixing this nit.","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"}],"barbican/model/repositories.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"cced0572d361b9b1d14a0f8e486052a0c0db0425","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            LOG.exception(msg)"},{"line_number":187,"context_line":"            raise exception.BarbicanException(msg)"},{"line_number":188,"context_line":"        finally:"},{"line_number":189,"context_line":"            if db_connection:"},{"line_number":190,"context_line":"                db_connection.close()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if CONF.db_auto_create:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_6418ccd3","line":189,"updated":"2016-01-25 16:04:03.000000000","message":"I missed this earlier...are you saying that this connection is not required, as it will be re-created as needed later? So was this connection just lingering around unused then?","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"e2d83e06ad0599ee39fe91fbc36a307471da403d","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            LOG.exception(msg)"},{"line_number":187,"context_line":"            raise exception.BarbicanException(msg)"},{"line_number":188,"context_line":"        finally:"},{"line_number":189,"context_line":"            if db_connection:"},{"line_number":190,"context_line":"                db_connection.close()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if CONF.db_auto_create:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_2985c258","line":189,"in_reply_to":"7a5de9d1_542bc382","updated":"2016-02-01 20:39:00.000000000","message":"I agree with that last point for sure. Future CR can tackle that...","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"},{"author":{"_account_id":17579,"name":"Elvin Tubillara","email":"edtubill@us.ibm.com","username":"edtubill"},"change_message_id":"748c5b8201eaaae46fdcd52def81ad76b1bf6454","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            LOG.exception(msg)"},{"line_number":187,"context_line":"            raise exception.BarbicanException(msg)"},{"line_number":188,"context_line":"        finally:"},{"line_number":189,"context_line":"            if db_connection:"},{"line_number":190,"context_line":"                db_connection.close()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if CONF.db_auto_create:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_e28559ad","line":189,"in_reply_to":"9a68dd71_0761c0a8","updated":"2016-01-26 14:39:22.000000000","message":"Is this initial connection a test for something? Also, I think that this would be a db connection cleanup instead of a session cleanup.","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"},{"author":{"_account_id":14926,"name":"Jeff Feng","email":"jianhua@us.ibm.com","username":"jhfeng"},"change_message_id":"5bce7129c370b4b8baffb909551feb687a01b850","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            LOG.exception(msg)"},{"line_number":187,"context_line":"            raise exception.BarbicanException(msg)"},{"line_number":188,"context_line":"        finally:"},{"line_number":189,"context_line":"            if db_connection:"},{"line_number":190,"context_line":"                db_connection.close()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if CONF.db_auto_create:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_0761c0a8","line":189,"in_reply_to":"9a68dd71_4f292189","updated":"2016-01-25 22:51:06.000000000","message":"if that\u0027s the case, line 182 is not needed.\nwe don\u0027t need to create db_connection at all.","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"2ab6ba99f7aafeb4827f4120f43921cd3a03a5c7","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            LOG.exception(msg)"},{"line_number":187,"context_line":"            raise exception.BarbicanException(msg)"},{"line_number":188,"context_line":"        finally:"},{"line_number":189,"context_line":"            if db_connection:"},{"line_number":190,"context_line":"                db_connection.close()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if CONF.db_auto_create:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_4f292189","line":189,"in_reply_to":"9a68dd71_6418ccd3","updated":"2016-01-25 16:10:26.000000000","message":"It seems that that\u0027s the case, since we are using sessions instead of accessing the connection directly.\n\nhttp://docs.sqlalchemy.org/en/latest/core/connections.html#module-sqlalchemy.engine\n\nthe first paragraph has some description about it.","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1ddaaf284f33d9740f1a7de11d83806ebfcc8b43","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            LOG.exception(msg)"},{"line_number":187,"context_line":"            raise exception.BarbicanException(msg)"},{"line_number":188,"context_line":"        finally:"},{"line_number":189,"context_line":"            if db_connection:"},{"line_number":190,"context_line":"                db_connection.close()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if CONF.db_auto_create:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_542bc382","line":189,"in_reply_to":"9a68dd71_e28559ad","updated":"2016-01-27 17:08:10.000000000","message":"# line 182 \u0027engine.connect()\u0027 call returns the handle to actual connection resource but that connection resource is not closed in existing code and it becomes source of a resource leak. The reason is that connection object is not available outside of this method scope so its a useless persistent connection handle.\n\n# line 182 is called to make sure that provided engine config is a valid working config by establishing actual connection. Without this, we would not till first actual connection is made (which is via sqlalchemy session as Oz mentioned above)\n\n# line 190 make sure that connection is closed so that connection resource is put back in pool (if its used) for subsequent use.\n\nAs we are talking about this, I think we should look into using oslo_db package as some of these issues are better managed and are already handled there.","commit_id":"28ee8bcffe00467c4bc79a926d576d881ca18887"}]}
