Thanks for the prompt reply, Jordan!

So the expectation then is that “this should work” (or be made to work)?

If so, submitting upstream PR’s is something I’d certainly be willing to do!

/Ryan

> On Jun 29, 2021, at 7:30 AM, Jordan Zimmerman <[email protected]> 
> wrote:
> 
> Hi,
> 
> Unfortunately, CuratorCache has not been testing in real world scenarios very 
> much. So, these may actually be bugs. If it's not behaving as you think it 
> should please open an issue and hopefully a PR. If you're unable to write the 
> PR maybe I or one of the other committers can get to it.
> 
> -Jordan
> 
>> On Jun 29, 2021, at 12:27 PM, Ryan Ruel <[email protected]> wrote:
>> 
>> I'm building an application using ModeledFrameworks and CuratorCache.
>> 
>> As I expect to have a large number of ZNodes (300k-1m potentially) I have my 
>> data fanned out into a ZPath structure:
>> 
>> /foo/bar/thing1
>> /foo/baz/thing2
>> /foo/buzz/thing3
>> 
>> etc.  (in the real application, these paths are a few depths deeper, but I 
>> think the point is the same).
>> 
>> The CuratorCache instance is watching/caching all data under parent ZPath 
>> /foo, and "thing1-3" are of my ModeledFramework type.
>> 
>> This is mostly working fine, but I've run into a few issues with Curator 
>> that have me questioning whether CuratorCache is supposed to be used with 
>> sub-paths.
>> 
>> For example, if I try to use the "childrenAsZNodes()" method (defined in the 
>> CachedModeledFramework interface) it fails as the implementation is using a 
>> filter for the ZPath which doesn't expect "parent()" to be anything but /foo 
>> (personally I'd have expected it to filter on Zpath startsWith() /foo).
>> 
>> Additionally, I see that when I delete any of the ZNodes for the 
>> intermediary path objects (such as /foo/bar) I receive an exception in my 
>> application as curator is trying to deserialize /foo/bar with null bytes (as 
>> that ZNode doesn't actually contain one of my ModeledFramework objects, it's 
>> and empty placeholder).  
>> 
>> Note that my application doesn't create the sub-path ZNodes, but is rather 
>> relying on the "Create Parents If Needed" create mode option.
>> 
>> I suppose an option would be for my application to create the intermediary 
>> ZNodes in the ZPath with something that Jackson can actually deserialize, 
>> but that is additional burden on ZooKeeper I'd like to avoid at scale.
>> 
>> Can anyone comment on if this is an appropriate use of CuratorCache?
>> 
>> /Ryan
>> 
>> 
> 

Reply via email to