)]}'
{"glance/registry/db/api.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"47b3b0c18cae68aa0eb966b2168acc94704510da","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            _ENGINE \u003d create_engine(sql_connection, **engine_args)"},{"line_number":93,"context_line":"            _ENGINE.create \u003d wrap_db_error(_ENGINE.create)"},{"line_number":94,"context_line":"            _ENGINE.connect \u003d wrap_db_error(_ENGINE.connect)"},{"line_number":95,"context_line":"            _ENGINE.connect()"},{"line_number":96,"context_line":"        except Exception, err:"},{"line_number":97,"context_line":"            msg \u003d _(\"Error configuring registry database with supplied \""},{"line_number":98,"context_line":"                    \"sql_connection \u0027%(sql_connection)s\u0027. \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FWA%3D","line":95,"updated":"2012-03-24 15:57:14.000000000","message":"Would this this call leak a Connection instance? (used here just to probe the DB availablity, i.e. not with the intent to execute any SQL statements as yet)\n\nWould it be better to explicitly close() that connection straight-away, i.e.\n\n    # do nothing with connection\n    _ENGINE.connect().close()\n\nAlso, one other question ... say you don\u0027t call _ENGINE.connect() explicitly here, in that case would it be called anyway later as a side-effect of of the sessionmaker creating a session?","commit_id":"12757d70fe6cf0d0fe6e46c5ee09a4f4d3efbd49"},{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"25644c418da7873f77379249ecc44f7d55b0e60c","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            _ENGINE \u003d create_engine(sql_connection, **engine_args)"},{"line_number":93,"context_line":"            _ENGINE.create \u003d wrap_db_error(_ENGINE.create)"},{"line_number":94,"context_line":"            _ENGINE.connect \u003d wrap_db_error(_ENGINE.connect)"},{"line_number":95,"context_line":"            _ENGINE.connect()"},{"line_number":96,"context_line":"        except Exception, err:"},{"line_number":97,"context_line":"            msg \u003d _(\"Error configuring registry database with supplied \""},{"line_number":98,"context_line":"                    \"sql_connection \u0027%(sql_connection)s\u0027. \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FB0%3D","line":95,"in_reply_to":"AAAAFH%2F%2F%2FWA%3D","updated":"2012-03-26 18:14:16.000000000","message":"Connections seem to only persist when there is a reference to the connection held open.  So no, it doesn\u0027t leak an explicit call to  close() can be certainly be added \u0027just in case\u0027.   I would have also thought wrapping the connect() method during configure_db() would be enough to trigger the wrapper for all sessions that attempt to connect, but it turns out thats not the case.  I haven\u0027t been able to look at SQLA\u0027s internals there, but I believe its doing some stuff internally with its connection pooling and a direct call to connect() is needed to trigger the wrapper at startup.","commit_id":"12757d70fe6cf0d0fe6e46c5ee09a4f4d3efbd49"}]}
