Fix for age calculation on unused nodes
Setting the node state automatically changes the state_time attribute for us, so our age calculation is always at 0 when we go to log how old the node is at delete time. Fix it so that we set state *after* logging the age. Change-Id: I6e0510405f43842529c733110378b96decb88a07
This commit is contained in:
parent
0ff94fa98b
commit
f1f55e4638
@ -1691,10 +1691,10 @@ class ZooKeeper(object):
|
||||
self.unlockNode(node)
|
||||
continue
|
||||
|
||||
node.state = DELETING
|
||||
try:
|
||||
self.log.debug("Deleting unused node %s (age: %s)",
|
||||
node.id, age(node.state_time))
|
||||
node.state = DELETING
|
||||
self.storeNode(node)
|
||||
except Exception:
|
||||
self.log.exception(
|
||||
|
Loading…
x
Reference in New Issue
Block a user