)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b7d5422e26642ff51f88d7d57ab79ed8ef04a33b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"present on the functions because they will catch the duplicate"},{"line_number":20,"context_line":"entry exception and start over."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The second is solved in this patch for VLANs by issuing an UPDATE"},{"line_number":23,"context_line":"WHERE query inside the transaction to update all \u0027allocated\u0027 values"},{"line_number":24,"context_line":"to False where allocated is already False. This effectively blocks"},{"line_number":25,"context_line":"all unallocated records from being changed to allocated while the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba2be162_6d032a43","line":22,"updated":"2017-03-01 21:05:50.000000000","message":"smart","commit_id":"dc8da5305c693ca8c30812111637b21d5e8a6aa8"}],"neutron/plugins/ml2/drivers/type_tunnel.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7d85199da0e62c86ceb2eefd3a215216d7b461b4","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # flush at the end of transaction"},{"line_number":163,"context_line":"            for chunk in chunks(to_remove, self.BULK_SIZE):"},{"line_number":164,"context_line":"                (ctx.session.query(self.model).filter(tunnel_col.in_(chunk))."},{"line_number":165,"context_line":"                 filter_by(allocated\u003dFalse).delete(synchronize_session\u003dFalse))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"            # collect vnis that need to be added"},{"line_number":168,"context_line":"            existings \u003d {tunnel_id_getter(a) for a in allocs}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_2bcde55d","line":165,"range":{"start_line":165,"start_character":27,"end_line":165,"end_character":42},"updated":"2017-03-06 16:42:47.000000000","message":"is it not already filtered in line 159?","commit_id":"dc8da5305c693ca8c30812111637b21d5e8a6aa8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"9c208fa44ca10202c9c9e92c9cc6161929c3f5f3","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # flush at the end of transaction"},{"line_number":163,"context_line":"            for chunk in chunks(to_remove, self.BULK_SIZE):"},{"line_number":164,"context_line":"                (ctx.session.query(self.model).filter(tunnel_col.in_(chunk))."},{"line_number":165,"context_line":"                 filter_by(allocated\u003dFalse).delete(synchronize_session\u003dFalse))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"            # collect vnis that need to be added"},{"line_number":168,"context_line":"            existings \u003d {tunnel_id_getter(a) for a in allocs}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_bc1bd97f","line":165,"range":{"start_line":165,"start_character":27,"end_line":165,"end_character":42},"in_reply_to":"ba2be162_2bcde55d","updated":"2017-03-06 17:27:33.000000000","message":"This is a separate DELETE query issued to the database. Without a lock there is a chance that one of these would change state to ALLOCATED\u003dTrue in a separate thread so we need to ensure the DELETE query doesn\u0027t hit these cases by using WHERE criteria.","commit_id":"dc8da5305c693ca8c30812111637b21d5e8a6aa8"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"59a63f2ed246f70f3fa4f1e1f0dec43d4e0da2dd","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # flush at the end of transaction"},{"line_number":163,"context_line":"            for chunk in chunks(to_remove, self.BULK_SIZE):"},{"line_number":164,"context_line":"                (ctx.session.query(self.model).filter(tunnel_col.in_(chunk))."},{"line_number":165,"context_line":"                 filter_by(allocated\u003dFalse).delete(synchronize_session\u003dFalse))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"            # collect vnis that need to be added"},{"line_number":168,"context_line":"            existings \u003d {tunnel_id_getter(a) for a in allocs}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba2be162_82514edb","line":165,"range":{"start_line":165,"start_character":27,"end_line":165,"end_character":42},"in_reply_to":"ba2be162_bc1bd97f","updated":"2017-03-06 17:54:31.000000000","message":"Ok, I got it.  I was confused because I noticed that the transaction was created in the line 150 and a subset of unallocated rows filtered in lines 158-159 are used in this for line 163 thru the to_remove variable","commit_id":"dc8da5305c693ca8c30812111637b21d5e8a6aa8"}],"neutron/plugins/ml2/drivers/type_vlan.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2bcc0bf98976d138a0aaf3c0b5004386c8769667","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                                          {\u0027vlan_id\u0027: alloc.vlan_id,"},{"line_number":109,"context_line":"                                           \u0027physical_network\u0027:"},{"line_number":110,"context_line":"                                           physical_network})"},{"line_number":111,"context_line":"                                alloc.update({\u0027allocated\u0027: False})"},{"line_number":112,"context_line":"                                ctx.session.delete(alloc)"},{"line_number":113,"context_line":"                    del allocations[physical_network]"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_6a26c1bb","line":111,"updated":"2017-03-07 20:11:11.000000000","message":"This was to trigger a staledataerror IIRC but it\u0027s not obvious. I just thought of another way I can just make the conditional update used here instead of up above so it\u0027s less magical. Let me post an update.","commit_id":"dc8da5305c693ca8c30812111637b21d5e8a6aa8"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"d4aa01c1c3a691ff70b4f8d0533fdfb0cc9a96b8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                                          {\u0027vlan_id\u0027: alloc.vlan_id,"},{"line_number":109,"context_line":"                                           \u0027physical_network\u0027:"},{"line_number":110,"context_line":"                                           physical_network})"},{"line_number":111,"context_line":"                                alloc.update({\u0027allocated\u0027: False})"},{"line_number":112,"context_line":"                                ctx.session.delete(alloc)"},{"line_number":113,"context_line":"                    del allocations[physical_network]"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_41d836f0","line":111,"updated":"2017-03-07 01:04:46.000000000","message":"We are updating the allocations at line 79. Can you please explain why are we updating it here again before deleting?","commit_id":"dc8da5305c693ca8c30812111637b21d5e8a6aa8"}]}
