curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunil Abraham <s.abra...@gmail.com>
Subject Re: Only getting PathChildrenCache updated after calling rebuild
Date Thu, 23 Oct 2014 14:51:33 GMT
Brilliant. Just to confirm for future users:

adding

Thread.sleep(500)

before each "Pre" fixes it.

Bests, S

On Thu, Oct 23, 2014 at 8:44 AM, Jordan Zimmerman
<jordan@jordanzimmerman.com> wrote:
> Updates occur in a different thread. Add a small sleep before
> cache.getCurrentData() and the test works as expected.
>
> -JZ
>
>
> On October 22, 2014 at 11:17:10 PM, Sunil Abraham (s.abraham@gmail.com)
> wrote:
>
> Sorry, was creating a minimal test case and not everything got copied
> over. Here's a better example
>
> https://gist.github.com/sabraham/f987395ff33fdbc8debc
>
> Stdout:
>
> foo
> Pre: 0
> Post: 1
> Pre: 1
> Post: 2
>
> Whereas I would have expected Pre to match Post.
>
> On Wed, Oct 22, 2014 at 7:17 PM, Jordan Zimmerman
> <jordan@jordanzimmerman.com> wrote:
>> You’re not starting the cache. You need to call cache.start()
>>
>>
>> On October 22, 2014 at 6:12:23 PM, Sunil Abraham (s.abraham@gmail.com)
>> wrote:
>>
>> Yup, here's a gist:
>>
>> https://gist.github.com/anonymous/1f7fdab9777e02d91ac1
>>
>> On Wed, Oct 22, 2014 at 6:27 PM, Jordan Zimmerman
>> <jordan@jordanzimmerman.com> wrote:
>>> Can you provide a test that shows the problem?
>>>
>>> -JZ
>>>
>>>
>>> On October 22, 2014 at 5:24:06 PM, Sunil Abraham (s.abraham@gmail.com)
>>> wrote:
>>>
>>> Hi everyone,
>>>
>>> I am having difficulty with the the PathChildrenCache; specifically,
>>> the local cache, which I am accessing through the getCurrentData
>>> method, seems to only to get updated after I call the rebuild method.
>>>
>>> Does anyone have any thoughts?
>>>
>>> S

Mime
View raw message