[ 
https://issues.apache.org/jira/browse/CURATOR-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930238#comment-16930238
 ] 

Cameron McKenzie commented on CURATOR-540:
------------------------------------------

My understanding is that StartMode.BUILD_INITIAL_CACHE is just used to enforce 
that the cache is built in the foreground when start() is called, and start() 
will not return until the cache is fully built. I don't believe there is 
anything that indicates that the event listener will not receive callbacks. I 
guess you could just add your listener after start() has returned if you don't 
want to get these events, or setup some sort of state in your listener to tell 
it to discard events until it gets an indication that the initial build is done.

> BUILD_INITIAL_CACHE mode will post history child on start
> ---------------------------------------------------------
>
>                 Key: CURATOR-540
>                 URL: https://issues.apache.org/jira/browse/CURATOR-540
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.12.0, 2.13.0
>            Reporter: HonglunChen
>            Priority: Major
>         Attachments: image-2019-09-16-12-43-01-588.png
>
>
> I debugged and found the root cause : In PathChildrenCache, CONNECTED state 
> is triggered before currentData initializes.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to