)]}'
{"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f3cddd26576a68645110e508ef655ef9d4b3bd91","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        while True:"},{"line_number":155,"context_line":"            with self._network_bulk_allocations_lock:"},{"line_number":156,"context_line":"                to_reload \u003d self._network_bulk_allocations.keys()"},{"line_number":157,"context_line":"                self._network_bulk_allocations \u003d {}"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            for network_id in to_reload:"},{"line_number":160,"context_line":"                network \u003d self.cache.get_network_by_id(network_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_36234658","line":157,"updated":"2020-07-14 18:53:28.000000000","message":"I\u0027d rather not use a lock if possible, and I found a comment in a similar piece of code, which I think is why I suggested  this in the bug.\n\nneutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py in rpc_loop()\n\n# Save updated ports dict to perform rollback in\n# case resync would be needed, and then clear\n# self.updated_ports. As the greenthread should not yield\n# between these two statements, this will be thread-safe\nupdated_ports_copy \u003d self.updated_ports\nself.updated_ports \u003d set()\n\nThat code has been there a while and proven to be safe.","commit_id":"abee7d1130c6a30e4ff065be3b7d8740ad3e018a"}]}
