)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"71fb5473f86f76b20a49694f8ba45ac5ed051f5d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"multiple coroutines from trying to hit the database at once in the"},{"line_number":18,"context_line":"background."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This doens\u0027t change the semantics of the notifier since its goal"},{"line_number":21,"context_line":"is always to send the latest events."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1665215"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa31d9ce_81c69e47","line":20,"updated":"2017-02-16 15:16:26.000000000","message":"nit: doesn\u0027t","commit_id":"0ebef2d7883d809c5827518184e81ce979e747d5"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3821044c5cb867ef96a93498d7f8ac26ac79ef04","unresolved":false,"context_lines":[{"line_number":17,"context_line":"multiple coroutines from trying to hit the database at once in the"},{"line_number":18,"context_line":"background."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This doens\u0027t change the semantics of the notifier since its goal"},{"line_number":21,"context_line":"is always to send the latest events."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1665215"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa31d9ce_b3f13198","line":20,"in_reply_to":"fa31d9ce_81c69e47","updated":"2017-02-16 18:37:22.000000000","message":"ack","commit_id":"0ebef2d7883d809c5827518184e81ce979e747d5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7a1531058c12b9d175af5a0e76b58173f87e6790","unresolved":false,"context_lines":[{"line_number":20,"context_line":"This doesn\u0027t change the semantics of the notifier since its goal"},{"line_number":21,"context_line":"is always to send the latest events."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1665215"},{"line_number":24,"context_line":"Change-Id: Ic259bad6f65f4bc45f5b900e0979c9a91865089b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da36d5c6_b91af415","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":6},"updated":"2017-02-20 08:04:01.000000000","message":"Partial?","commit_id":"630a7da3560fce0d914e5ebda0ec5dde5325e113"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"4efcfce566b8bb46348b4282f008d7f783e27762","unresolved":false,"context_lines":[{"line_number":20,"context_line":"This doesn\u0027t change the semantics of the notifier since its goal"},{"line_number":21,"context_line":"is always to send the latest events."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1665215"},{"line_number":24,"context_line":"Change-Id: Ic259bad6f65f4bc45f5b900e0979c9a91865089b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da36d5c6_2b2da6a7","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":6},"in_reply_to":"da36d5c6_b91af415","updated":"2017-02-21 06:57:41.000000000","message":"Done","commit_id":"630a7da3560fce0d914e5ebda0ec5dde5325e113"}],"neutron/plugins/ml2/ovo_rpc.py":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"71fb5473f86f76b20a49694f8ba45ac5ed051f5d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        resource_id \u003d self._extract_resource_id(kwargs)"},{"line_number":80,"context_line":"        # we preserve the context so we can trace a receive on the agent back"},{"line_number":81,"context_line":"        # to the server-side event that triggered it"},{"line_number":82,"context_line":"        self._resources_to_push[resource_id] \u003d context.to_dict()"},{"line_number":83,"context_line":"        # spawn worker so we don\u0027t block main AFTER_UPDATE thread"},{"line_number":84,"context_line":"        self._worker_pool.spawn(self.dispatch_events)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_e1ecba94","line":82,"updated":"2017-02-16 15:16:26.000000000","message":"I think this setting of self._resources_to_push should also be inside the \u0027event-dispatch\u0027 mutex.  If not, can you explain why?","commit_id":"0ebef2d7883d809c5827518184e81ce979e747d5"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8e8b188452542bfef8008e4464f136d780830884","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        resource_id \u003d self._extract_resource_id(kwargs)"},{"line_number":80,"context_line":"        # we preserve the context so we can trace a receive on the agent back"},{"line_number":81,"context_line":"        # to the server-side event that triggered it"},{"line_number":82,"context_line":"        self._resources_to_push[resource_id] \u003d context.to_dict()"},{"line_number":83,"context_line":"        # spawn worker so we don\u0027t block main AFTER_UPDATE thread"},{"line_number":84,"context_line":"        self._worker_pool.spawn(self.dispatch_events)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_b375b133","line":82,"updated":"2017-02-16 18:34:24.000000000","message":"These are eventlet coroutines. There is no possible way for the swap on L90 to not appear atomic to the other coroutines because variable assignments are non-yielding operations.\n\nThe lock isn\u0027t to protect that datastructure, it would be completely safe lockless. The lock is to serialize the workers to keep load off of the database and allow for batching later.","commit_id":"0ebef2d7883d809c5827518184e81ce979e747d5"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"99c9fea31121cab397dd379d4cf8116cbdf5f9c6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        resource_id \u003d self._extract_resource_id(kwargs)"},{"line_number":80,"context_line":"        # we preserve the context so we can trace a receive on the agent back"},{"line_number":81,"context_line":"        # to the server-side event that triggered it"},{"line_number":82,"context_line":"        self._resources_to_push[resource_id] \u003d context.to_dict()"},{"line_number":83,"context_line":"        # spawn worker so we don\u0027t block main AFTER_UPDATE thread"},{"line_number":84,"context_line":"        self._worker_pool.spawn(self.dispatch_events)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_2ca32951","line":82,"in_reply_to":"fa31d9ce_e1ecba94","updated":"2017-02-16 15:36:41.000000000","message":"I think I agree with Neil:\n\n1. self._resources_to_push contains resource_id\u003dX.\n2. worker is spawned\n3. self._resources_to_push is copied to \u0027to_dispatch\u0027 in L90\n4. self._resources to push is cleaned up in L90\n\nIf between 3 and 4, resource_id\u003dY is inserted into self._resources_to_push at L82, then this event won\u0027t be dispatched.\n\nDoes it make sense?","commit_id":"0ebef2d7883d809c5827518184e81ce979e747d5"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"99c9fea31121cab397dd379d4cf8116cbdf5f9c6","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            for res, obj_class in resource_objclass_map.items()"},{"line_number":144,"context_line":"        }"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def wait(self):"},{"line_number":147,"context_line":"        \"\"\"Wait for all handlers to finish processing async events.\"\"\""},{"line_number":148,"context_line":"        for handler in self._resource_handlers.values():"},{"line_number":149,"context_line":"            handler.wait()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_0c6ca507","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":12},"updated":"2017-02-16 15:36:41.000000000","message":"This is not called anywhere but in tests, is there any other situation we may want to wait for this?","commit_id":"0ebef2d7883d809c5827518184e81ce979e747d5"}]}
