nodepool/nodepool/zk
James E. Blair 7d83166346 Fix exception in cache update
In the ZK cache, we previously would exit the cache update method
if we received a cache add or update with the empty string as data.
This usually represents a component trying to lock something after
it has been deleted, and the path being recreated with empty data,
so it's safe to ignore.

During the recent cache refactor, the short circuit we previously
had (if !data, return) was inadvertently converted to (if !data,
data=None) which would then throw an exception as we tried to
deserialize a None object.  The only reason to proceed with the
method at this point is to trigger the postCacheHook, and the only
postCacheHook implemented updates node stats, which don't need to
be updated in this case.

In other words, the old behavior of simply returning from the cache
listener in this case is acceptable and we should revert to it.

Change-Id: I9567bd387ab65f08a3f05be466760bd8e1c5c149
2023-03-16 11:35:16 -07:00
..
__init__.py Use Zuul-style ZooKeeper connections 2022-05-23 07:40:20 -07:00
components.py Add provider/pool priority support 2022-05-23 13:28:21 -07:00
exceptions.py Use Zuul-style ZooKeeper connections 2022-05-23 07:40:20 -07:00
handler.py Use Zuul-style ZooKeeper connections 2022-05-23 07:40:20 -07:00
zookeeper.py Fix exception in cache update 2023-03-16 11:35:16 -07:00