zentol opened a new pull request #16558:
URL: https://github.com/apache/flink/pull/16558


   Replaces usages of the `NodeCache` with a `TreeCache`.
   
   The core issue is that the `NodeCache` tries to ensure that the parents to 
the observed node exist. This can result in curator exceptions that crash the 
TM if concurrently the path is being deleted. Originally I tried to create a 
modified `NodeCache` implementation, but got a bad feeling when it came to 
maintaining said class.
   
   I then looked at other curator caching recipes; the `PathChildrenCache` 
initially looked neat because it's very purpose is handling entire paths and 
not single nodes, but it has the same behavior as the `NodeCache` w.r.t. 
creating parents. 
   
   Then I stumbled on the `TreeCache`, which after some experimenting turned 
out to be an incredibly flexible class. It _can_ create parent nodes, but its 
opt-in. It _can_ observe a node tree, but can also be configured to only 
consider a single node.
   Even the listener interface is superior, providing more information as to 
the node change (added/modified/removed) _and_ connection issues (which this PR 
makes no use of, but still, _pretty neat_).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to