Updated Branches: refs/heads/master c0d998704 -> 766544c41
BLUR-224, safeMode 'registerNode' timeout value to sessionTimeout() + 4 sec(s). Signed-off-by: Aaron McCurry <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/766544c4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/766544c4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/766544c4 Branch: refs/heads/master Commit: 766544c41fa56d9be2b4c148cba75101258280f5 Parents: c0d9987 Author: Vikrant Navalgund <[email protected]> Authored: Thu Oct 10 11:21:41 2013 +1100 Committer: Aaron McCurry <[email protected]> Committed: Wed Oct 9 20:29:46 2013 -0400 ---------------------------------------------------------------------- .../blur/manager/indexserver/DistributedIndexServer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/766544c4/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java ---------------------------------------------------------------------- diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java index 49908e4..2fc819c 100644 --- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java +++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java @@ -152,8 +152,12 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer { registerMyselfAsMemberOfCluster(); String onlineShardsPath = ZookeeperPathConstants.getOnlineShardsPath(_cluster); String safemodePath = ZookeeperPathConstants.getSafemodePath(_cluster); + + //Set the registerNode timeout value to zk sessionTimeout + {4} seconds + int registerNodeTimeOut = _zookeeper.getSessionTimeout()/1000 + 4; + SafeMode safeMode = new SafeMode(_zookeeper, safemodePath, onlineShardsPath, TimeUnit.MILLISECONDS, _safeModeDelay, - TimeUnit.SECONDS, 60); + TimeUnit.SECONDS, registerNodeTimeOut); safeMode.registerNode(getNodeName(), BlurUtil.getVersion().getBytes()); _running.set(true);
