You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when watching ephemeral nodes the consuming code has to "manually" check for and remove listeners for dead ephemeral nodes. Since ZkClient doesn't deliver the node deletion event (EventType.NodeDeleted) explicitly but rather encapsulates it in a "data change" event this forces the consuming code to execute another read with zookeeper to find out that the node was indeed deleted.
When watching for ephemeral sequential nodes (e.g., leader election scenario) if the client doesn't remove the listener they continue to build up in the list forever.
I think it should be possible to provide a flag on listener registration to remove the listener when the watched node gets deleted. Another option would be to send back the underlying EventType to a data changed listener and still require the client code to remove the listener on it's own.
The text was updated successfully, but these errors were encountered:
Currently when watching ephemeral nodes the consuming code has to "manually" check for and remove listeners for dead ephemeral nodes. Since ZkClient doesn't deliver the node deletion event (EventType.NodeDeleted) explicitly but rather encapsulates it in a "data change" event this forces the consuming code to execute another read with zookeeper to find out that the node was indeed deleted.
When watching for ephemeral sequential nodes (e.g., leader election scenario) if the client doesn't remove the listener they continue to build up in the list forever.
I think it should be possible to provide a flag on listener registration to remove the listener when the watched node gets deleted. Another option would be to send back the underlying EventType to a data changed listener and still require the client code to remove the listener on it's own.
The text was updated successfully, but these errors were encountered: