)]}'
{"quantum/db/db_base_plugin_v2.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"3f020302239eaa3cc83be775049db59dc9e37cd4","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            fixed_ip \u003d query.one()"},{"line_number":398,"context_line":"            fixed_ip.expiration \u003d expiration"},{"line_number":399,"context_line":"            context.session.merge(fixed_ip)"},{"line_number":400,"context_line":"        except exc.NoResultFound:"},{"line_number":401,"context_line":"            LOG.debug(_(\"No fixed IP found that matches the network \""},{"line_number":402,"context_line":"                        \"%(network_id)s and ip address %(ip_address)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHk8%3D","line":399,"updated":"2013-02-06 17:23:49.000000000","message":"Not sure that merge is the correct behavior here.  I think we need to start a transaction and replace lines 397-399:\n\nwith context.session.begin(subtransactions\u003dTrue):\n    fixed_ip \u003d query.one()\n    fixed_ip.expiration \u003d expiration","commit_id":"bbe500b9eff731689ec8276f3f30eed5df16dd64"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            fixed_ip \u003d query.one()"},{"line_number":398,"context_line":"            fixed_ip.expiration \u003d expiration"},{"line_number":399,"context_line":"            context.session.merge(fixed_ip)"},{"line_number":400,"context_line":"        except exc.NoResultFound:"},{"line_number":401,"context_line":"            LOG.debug(_(\"No fixed IP found that matches the network \""},{"line_number":402,"context_line":"                        \"%(network_id)s and ip address %(ip_address)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHek%3D","line":399,"in_reply_to":"AAAAM3%2F%2FHk8%3D","updated":"2013-02-06 18:05:08.000000000","message":"Is this related to https://bugs.launchpad.net/quantum/+bug/1084450?","commit_id":"bbe500b9eff731689ec8276f3f30eed5df16dd64"},{"author":{"_account_id":6624,"name":"Stephen Gran","email":"sgran@debian.org","username":"sgran"},"change_message_id":"a89c6dbc75a2466e757b329bf965f35d2ba557c0","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            fixed_ip \u003d query.one()"},{"line_number":398,"context_line":"            fixed_ip.expiration \u003d expiration"},{"line_number":399,"context_line":"            context.session.merge(fixed_ip)"},{"line_number":400,"context_line":"        except exc.NoResultFound:"},{"line_number":401,"context_line":"            LOG.debug(_(\"No fixed IP found that matches the network \""},{"line_number":402,"context_line":"                        \"%(network_id)s and ip address %(ip_address)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHkM%3D","line":399,"in_reply_to":"AAAAM3%2F%2FHk8%3D","updated":"2013-02-07 06:47:12.000000000","message":"Running postgres with query logging enabled, I could see that we are beginning a transaction, selection the ipallocation, and doing a rollback.  With this patch, we then start a second transaction, do the UPDATE, and then a commit.\n\nYou may be correct, of course, and I\u0027ll be happy to test that approach tomorrow.  Just mentioning that this approach produces correct database queries.\n\nGaryk:\nYes, this is related to the first report in that bug, but then people start talking about the frequency of the callback, which is a design issue rather than an implementation flaw.  I\u0027m only concerned with the implementation flaw here.\n\nCheers,","commit_id":"bbe500b9eff731689ec8276f3f30eed5df16dd64"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":393,"context_line":"        query \u003d context.session.query(models_v2.IPAllocation)"},{"line_number":394,"context_line":"        query \u003d query.filter_by(network_id\u003dnetwork_id, ip_address\u003dip_address)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            fixed_ip \u003d query.one()"},{"line_number":398,"context_line":"            fixed_ip.expiration \u003d expiration"},{"line_number":399,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B8qo%3D","line":396,"updated":"2013-02-13 16:28:15.000000000","message":"Following a discussion with Mark, can you please consider:\n           with context.session.begin(subtransactions\u003dTrue):\n                fixed_ip \u003d query.one()\n                fixed_ip.expiration \u003d expiration\nThis will save the add operation.\nI have tested this and it works","commit_id":"1687b1a16096b6ba5f238fe698acbdad793a88ca"}]}
