Add extra safety belt when reusing a node
When reusing a node we lock it but don't check if the state is still ready. There are probably few to no possibilities how this can happen. But it's better to guarantee this condition than to think that this should be ok. Change-Id: I365de6accb28b538dae5ff1dfb6c4a9966e50b01
This commit is contained in:
parent
b6a3e319e7
commit
e4f245eb13
@ -437,6 +437,11 @@ class NodeRequestHandler(NodeRequestHandlerNotifications,
|
||||
# It's already locked so skip it.
|
||||
continue
|
||||
else:
|
||||
# Add an extra safety check that the node is still
|
||||
# ready.
|
||||
if node.state != zk.READY:
|
||||
self.zk.unlockNode(node)
|
||||
continue
|
||||
if self.paused:
|
||||
self.log.debug("Unpaused request %s", self.request)
|
||||
self.paused = False
|
||||
|
Loading…
Reference in New Issue
Block a user