)]}'
{"neutron/db/securitygroups_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4612a38def06a0d23bcff6d556ce41cea0eb38fd","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                    direction\u003d\u0027egress\u0027,"},{"line_number":112,"context_line":"                    ethertype\u003dethertype)"},{"line_number":113,"context_line":"                context.session.add(egress_rule)"},{"line_number":114,"context_line":"                context.session.flush()"},{"line_number":115,"context_line":"            secgroup_dict \u003d self._make_security_group_dict(security_group_db)"},{"line_number":116,"context_line":"            kwargs[\u0027security_group\u0027] \u003d secgroup_dict"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_a353046a","line":114,"updated":"2017-03-22 07:34:02.000000000","message":"why do we need the flush? is this so that the callback can do a database query?\nPlease add a comment here.\nI have seen many cases when a flush under load has issues","commit_id":"eca50b162b11dd03c2b5aeec6b3be795b5814bc2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"bf6177a480aa6ad7e0feef4c00a570255ae460e6","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                    direction\u003d\u0027egress\u0027,"},{"line_number":112,"context_line":"                    ethertype\u003dethertype)"},{"line_number":113,"context_line":"                context.session.add(egress_rule)"},{"line_number":114,"context_line":"                context.session.flush()"},{"line_number":115,"context_line":"            secgroup_dict \u003d self._make_security_group_dict(security_group_db)"},{"line_number":116,"context_line":"            kwargs[\u0027security_group\u0027] \u003d secgroup_dict"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_a3af8428","line":114,"in_reply_to":"1a1ced50_a353046a","updated":"2017-03-22 07:46:43.000000000","message":"Hi garyk, \nIn order to understand the issue correctly, can you let me know the problems faced due to flush under load ?\n\nYes, its to do a DB query","commit_id":"eca50b162b11dd03c2b5aeec6b3be795b5814bc2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4612a38def06a0d23bcff6d556ce41cea0eb38fd","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                description\u003drule_dict.get(\u0027description\u0027)"},{"line_number":362,"context_line":"            )"},{"line_number":363,"context_line":"            context.session.add(db)"},{"line_number":364,"context_line":"            context.session.flush()"},{"line_number":365,"context_line":"            res_rule_dict \u003d self._make_security_group_rule_dict(db)"},{"line_number":366,"context_line":"            kwargs[\u0027security_group_rule\u0027] \u003d res_rule_dict"},{"line_number":367,"context_line":"            self._registry_notify(resources.SECURITY_GROUP_RULE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_8356085a","line":364,"updated":"2017-03-22 07:34:02.000000000","message":"ditto","commit_id":"eca50b162b11dd03c2b5aeec6b3be795b5814bc2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"bf6177a480aa6ad7e0feef4c00a570255ae460e6","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                description\u003drule_dict.get(\u0027description\u0027)"},{"line_number":362,"context_line":"            )"},{"line_number":363,"context_line":"            context.session.add(db)"},{"line_number":364,"context_line":"            context.session.flush()"},{"line_number":365,"context_line":"            res_rule_dict \u003d self._make_security_group_rule_dict(db)"},{"line_number":366,"context_line":"            kwargs[\u0027security_group_rule\u0027] \u003d res_rule_dict"},{"line_number":367,"context_line":"            self._registry_notify(resources.SECURITY_GROUP_RULE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_c3a80023","line":364,"in_reply_to":"1a1ced50_8356085a","updated":"2017-03-22 07:46:43.000000000","message":"ditto","commit_id":"eca50b162b11dd03c2b5aeec6b3be795b5814bc2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4612a38def06a0d23bcff6d556ce41cea0eb38fd","unresolved":false,"context_lines":[{"line_number":655,"context_line":"                                  events.PRECOMMIT_DELETE,"},{"line_number":656,"context_line":"                                  exc_cls\u003dext_sg.SecurityGroupRuleInUse, id\u003did,"},{"line_number":657,"context_line":"                                  **kwargs)"},{"line_number":658,"context_line":"            context.session.delete(sg_rule)"},{"line_number":659,"context_line":"            kwargs[\u0027security_group_id\u0027] \u003d sg_rule[\u0027security_group_id\u0027]"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"        registry.notify("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_63d4acbc","line":658,"updated":"2017-03-22 07:34:02.000000000","message":"why are we doing a delete here?","commit_id":"eca50b162b11dd03c2b5aeec6b3be795b5814bc2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"bf6177a480aa6ad7e0feef4c00a570255ae460e6","unresolved":false,"context_lines":[{"line_number":655,"context_line":"                                  events.PRECOMMIT_DELETE,"},{"line_number":656,"context_line":"                                  exc_cls\u003dext_sg.SecurityGroupRuleInUse, id\u003did,"},{"line_number":657,"context_line":"                                  **kwargs)"},{"line_number":658,"context_line":"            context.session.delete(sg_rule)"},{"line_number":659,"context_line":"            kwargs[\u0027security_group_id\u0027] \u003d sg_rule[\u0027security_group_id\u0027]"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"        registry.notify("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_034cd89c","line":658,"in_reply_to":"1a1ced50_63d4acbc","updated":"2017-03-22 07:46:43.000000000","message":"This was done to clear the current session context, but I guess this can be removed on the hindsight","commit_id":"eca50b162b11dd03c2b5aeec6b3be795b5814bc2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"09d30f7b4660e9e3f7832dd9b792593f8d72d953","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                    direction\u003d\u0027egress\u0027,"},{"line_number":113,"context_line":"                    ethertype\u003dethertype)"},{"line_number":114,"context_line":"                context.session.add(egress_rule)"},{"line_number":115,"context_line":"                context.session.flush()"},{"line_number":116,"context_line":"            secgroup_dict \u003d self._make_security_group_dict(security_group_db)"},{"line_number":117,"context_line":"            kwargs[\u0027security_group\u0027] \u003d secgroup_dict"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_769e5464","line":115,"updated":"2017-04-16 04:28:54.000000000","message":"flush shouldn\u0027t be necessary. when autonested exits it will flush","commit_id":"2774cbde61956fb60af3578636e1127540623878"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a32600d4922246260f76d481ea657c556a1423fe","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":686,"context_line":"            sgr \u003d self._get_security_group_rule(context, id)"},{"line_number":687,"context_line":"            kwargs[\u0027security_group_id\u0027] \u003d sgr[\u0027security_group_id\u0027]"},{"line_number":688,"context_line":"            self._registry_notify(resources.SECURITY_GROUP_RULE,"},{"line_number":689,"context_line":"                                  events.PRECOMMIT_DELETE,"},{"line_number":690,"context_line":"                                  exc_cls\u003dext_sg.SecurityGroupRuleInUse, id\u003did,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f231b9d_d89d91bc","line":687,"updated":"2017-06-18 08:49:44.000000000","message":"not 100% sure why you need to move the code here. The notification should just get the id and nothing else.\nIn the worst case if the notification throws and exception then we have wasted a few cycles :)","commit_id":"89abce3efe0645cc08e840b4cc4d455889ee8866"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"28a5a9779bb15cba30f763f4bea7ad1e6479b238","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":686,"context_line":"            sgr \u003d self._get_security_group_rule(context, id)"},{"line_number":687,"context_line":"            kwargs[\u0027security_group_id\u0027] \u003d sgr[\u0027security_group_id\u0027]"},{"line_number":688,"context_line":"            self._registry_notify(resources.SECURITY_GROUP_RULE,"},{"line_number":689,"context_line":"                                  events.PRECOMMIT_DELETE,"},{"line_number":690,"context_line":"                                  exc_cls\u003dext_sg.SecurityGroupRuleInUse, id\u003did,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f231b9d_7c0d4ae6","line":687,"in_reply_to":"7f231b9d_66101a58","updated":"2017-06-19 06:14:16.000000000","message":"the info is set in line 686 - so this is just overwriting it.\nthe only change is when the object is read","commit_id":"89abce3efe0645cc08e840b4cc4d455889ee8866"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f2b98f86dd6f62661cbe67585b8a31b0e4c0d87d","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":686,"context_line":"            sgr \u003d self._get_security_group_rule(context, id)"},{"line_number":687,"context_line":"            kwargs[\u0027security_group_id\u0027] \u003d sgr[\u0027security_group_id\u0027]"},{"line_number":688,"context_line":"            self._registry_notify(resources.SECURITY_GROUP_RULE,"},{"line_number":689,"context_line":"                                  events.PRECOMMIT_DELETE,"},{"line_number":690,"context_line":"                                  exc_cls\u003dext_sg.SecurityGroupRuleInUse, id\u003did,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f231b9d_a2827351","line":687,"in_reply_to":"7f231b9d_7c0d4ae6","updated":"2017-06-20 23:58:23.000000000","message":"https://review.openstack.org/#/c/475649/\nto fix it up.","commit_id":"89abce3efe0645cc08e840b4cc4d455889ee8866"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"fcd09da944273786877ee3bfc1dfafb61547649b","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":686,"context_line":"            sgr \u003d self._get_security_group_rule(context, id)"},{"line_number":687,"context_line":"            kwargs[\u0027security_group_id\u0027] \u003d sgr[\u0027security_group_id\u0027]"},{"line_number":688,"context_line":"            self._registry_notify(resources.SECURITY_GROUP_RULE,"},{"line_number":689,"context_line":"                                  events.PRECOMMIT_DELETE,"},{"line_number":690,"context_line":"                                  exc_cls\u003dext_sg.SecurityGroupRuleInUse, id\u003did,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f231b9d_66101a58","line":687,"in_reply_to":"7f231b9d_d89d91bc","updated":"2017-06-18 19:39:59.000000000","message":"So AFTER_DELETE notification should not receive it too?\nIf so, we can drop this line(kwargs[] \u003d sgr[]) entirely.","commit_id":"89abce3efe0645cc08e840b4cc4d455889ee8866"}]}
