You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Zili Chen (Jira)" <ji...@apache.org> on 2023/09/15 01:16:00 UTC

[jira] [Commented] (CURATOR-508) LeaderLatch#setNode might throws unexpected NoNodeException

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

Zili Chen commented on CURATOR-508:
-----------------------------------

After a closer look the issued call above is with a {{null}} callback so it's effectively "quietly".

> LeaderLatch#setNode might throws unexpected NoNodeException
> -----------------------------------------------------------
>
>                 Key: CURATOR-508
>                 URL: https://issues.apache.org/jira/browse/CURATOR-508
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>            Reporter: Zili Chen
>            Priority: Major
>
> {code:java}
> private void setNode(String newValue) throws Exception
> {
>  String oldPath = ourPath.getAndSet(newValue);
>  if ( oldPath != null )
>  {
>  client.delete().guaranteed().inBackground().forPath(oldPath);
>  }
> }{code}
> What if the election node deleted for some reason, e.g., the session disconnected and reconnected? Should we use {{#quietly()}} here?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)