Once the connection is repaired NodeCache is supposed to reconnect. You can see
the code here:
https://github.com/apache/curator/blob/master/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/NodeCache.java#L75
<https://github.com/apache/curator/blob/master/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/NodeCache.java#L75>
If it's not, it's some kind of bug.
> On Apr 19, 2021, at 3:25 PM, tison <[email protected]> wrote:
>
> Hi Curators,
>
> Recently I found a case that NodeCache would do nothing if ZK is really
> lost. It is by design? I can workaround this issue by adding connection
> listener handling ConnectionState.{SUSPENDED, LOST} though.
>
> Best,
> tison.