Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-415

SharedValue doesn't retry on session expiration and the approach to retries is not clear

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      When the session expires, seemingly on a background thread, trying to set a shared value instantly fails (in our logs there's no delay between the previous activity of the calling thread, and the exception). Judging by the code in RetryLoop that is the default behavior.
      Seems like there should be some mechanism to wait and/or retry. Also, in absence of such mechanism it's not clear whether external retries should be used, or whether SharedValue object is entirely unusable after session expiration (since if it were usable across sessions, one would assume it would retry internally )

      2017-05-17T21:33:33,863 ERROR [b99e518c-9777-4c99-b5e7-c9a371aba3af HiveServer2-Handler-Pool: Thread-36331-EventThread]: imps.CuratorFrameworkImpl (CuratorFrameworkImpl.java:logError(546)) - Watcher exception
      org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for ...
      ...
      2017-05-17T21:33:39,935 
      ... 
      Caused by: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$SessionExpiredException:KeeperErrorCode = Session expired for /zkdtsm_hive_llap0/ZKDTSMRoot/ZKDTSMSeqNumRoot
      	at org.apache.zookeeper.KeeperException.create(KeeperException.java:127)
      	at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
      	at org.apache.zookeeper.ZooKeeper.setData(ZooKeeper.java:1270)
      	at org.apache.curator.framework.imps.SetDataBuilderImpl$4.call(SetDataBuilderImpl.java:274)
      	at org.apache.curator.framework.imps.SetDataBuilderImpl$4.call(SetDataBuilderImpl.java:270)
      	at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107)
      	at org.apache.curator.framework.imps.SetDataBuilderImpl.pathInForeground(SetDataBuilderImpl.java:267)
      	at org.apache.curator.framework.imps.SetDataBuilderImpl.forPath(SetDataBuilderImpl.java:253)
      	at org.apache.curator.framework.imps.SetDataBuilderImpl.forPath(SetDataBuilderImpl.java:41)
      	at org.apache.curator.framework.recipes.shared.SharedValue.trySetValue(SharedValue.java:168)
      	at org.apache.curator.framework.recipes.shared.SharedCount.trySetCount(SharedCount.java:111)
      

      Attachments

        Activity

          People

            randgalt Jordan Zimmerman
            sershe Sergey Shelukhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: