)]}'
{"nodepool/zk.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"89b8a96fbb17552aa8e563b0b2c1fee4fb1c5cf8","unresolved":false,"context_lines":[{"line_number":2065,"context_line":"            self.deleteNode(node)"},{"line_number":2066,"context_line":""},{"line_number":2067,"context_line":"    def cacheFaultListener(self, e):"},{"line_number":2068,"context_line":"        self.log.exception(e)"},{"line_number":2069,"context_line":""},{"line_number":2070,"context_line":"    def nodeCacheListener(self, event):"},{"line_number":2071,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_5b25f7be","line":2068,"updated":"2018-11-26 17:58:38.000000000","message":"I\u0027m not sure the exception handler is right for this (it logs tracebacks); perhaps this should just be \"error\".","commit_id":"efc5424d95010fe1fce2d5c247edaf1e5a682807"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"bb44235384d63ee9e57d9361a782b2c173f1f3ff","unresolved":false,"context_lines":[{"line_number":2065,"context_line":"            self.deleteNode(node)"},{"line_number":2066,"context_line":""},{"line_number":2067,"context_line":"    def cacheFaultListener(self, e):"},{"line_number":2068,"context_line":"        self.log.exception(e)"},{"line_number":2069,"context_line":""},{"line_number":2070,"context_line":"    def nodeCacheListener(self, event):"},{"line_number":2071,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_26fa6210","line":2068,"in_reply_to":"3f79a3b5_5b25f7be","updated":"2018-11-26 18:06:45.000000000","message":"will change","commit_id":"efc5424d95010fe1fce2d5c247edaf1e5a682807"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"89b8a96fbb17552aa8e563b0b2c1fee4fb1c5cf8","unresolved":false,"context_lines":[{"line_number":2097,"context_line":"            # replace it in order to not provoke any data races if a different"},{"line_number":2098,"context_line":"            # thread is doing something with a node it already got from the"},{"line_number":2099,"context_line":"            # cache."},{"line_number":2100,"context_line":"            self._cached_nodes[node_id] \u003d node"},{"line_number":2101,"context_line":""},{"line_number":2102,"context_line":"        elif event.event_type \u003d\u003d TreeEvent.NODE_REMOVED:"},{"line_number":2103,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_7b20f3ae","line":2100,"updated":"2018-11-26 17:58:38.000000000","message":"Perhaps we should update in place.  After all, if a thread wants to avoid having the data change under it, it should hold the lock.  If it is going to use the data without the lock, it\u0027s probably not doing anything important.  For example, iterating over nodes for one to allocate, or requests for one to handle, are things we may do without the lock.  If we find one of those, we\u0027re going to lock it and update it anyway (and there are already checks to handle data changing between the scan and lock).  We might iterate over nodes for stats, but that doesn\u0027t matter.\n\nOhhh.\n\nIs this here because we might get a delayed event to update a node even after we\u0027ve locked it?  Ie, Zuul updates a node in ZK, nodepool provider thread locks the node and updates it from ZK, then this thread processes the update event from zuul and updates the data out from under the provider thread?\n\nI think znodes have version numbers, so perhaps it\u0027s okay to update in-place as long as the version number for the change is \u003e the current version number of our object in memory?","commit_id":"efc5424d95010fe1fce2d5c247edaf1e5a682807"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"bb44235384d63ee9e57d9361a782b2c173f1f3ff","unresolved":false,"context_lines":[{"line_number":2097,"context_line":"            # replace it in order to not provoke any data races if a different"},{"line_number":2098,"context_line":"            # thread is doing something with a node it already got from the"},{"line_number":2099,"context_line":"            # cache."},{"line_number":2100,"context_line":"            self._cached_nodes[node_id] \u003d node"},{"line_number":2101,"context_line":""},{"line_number":2102,"context_line":"        elif event.event_type \u003d\u003d TreeEvent.NODE_REMOVED:"},{"line_number":2103,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_a66432e7","line":2100,"in_reply_to":"3f79a3b5_7b20f3ae","updated":"2018-11-26 18:06:45.000000000","message":"yes, my thinking was because of delayed events that should not modify already existing nodes. But yes, using version numbers could make this more efficient.","commit_id":"efc5424d95010fe1fce2d5c247edaf1e5a682807"}]}
