Sergey Shelukhin created CURATOR-415:
----------------------------------------

             Summary: SharedValue doesn't retry on session expiration and the 
approach to retries is not clear
                 Key: CURATOR-415
                 URL: https://issues.apache.org/jira/browse/CURATOR-415
             Project: Apache Curator
          Issue Type: Bug
            Reporter: Sergey Shelukhin
            Assignee: Jordan Zimmerman


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 ;))

{noformat}
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)
{noformat}





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to