Repository: aries-rsa Updated Branches: refs/heads/master ac635c960 -> 5cda378e7
[ARIES-1758] Only log session timeout in debug level Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/5cda378e Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/5cda378e Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/5cda378e Branch: refs/heads/master Commit: 5cda378e7a022d9687ef7e7d5a3c8e42ccdf528d Parents: ac635c9 Author: Christian Schneider <cschn...@adobe.com> Authored: Mon Feb 12 10:02:31 2018 +0100 Committer: Christian Schneider <cschn...@adobe.com> Committed: Mon Feb 12 10:02:31 2018 +0100 ---------------------------------------------------------------------- .../zookeeper/repository/ZookeeperEndpointRepository.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/5cda378e/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java ---------------------------------------------------------------------- diff --git a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java index 84bac77..271f22b 100644 --- a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java +++ b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/repository/ZookeeperEndpointRepository.java @@ -19,6 +19,7 @@ import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException.NoNodeException; import org.apache.zookeeper.KeeperException.NodeExistsException; +import org.apache.zookeeper.KeeperException.SessionExpiredException; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.Watcher.Event.EventType; @@ -168,7 +169,7 @@ public class ZookeeperEndpointRepository implements Closeable, Watcher { } private void watchRecursive(String path) { - LOG.info("Watching {}", path); + LOG.debug("Watching {}", path); handleZNodeChanged(path); try { List<String> children = zk.getChildren(path, this); @@ -179,6 +180,9 @@ public class ZookeeperEndpointRepository implements Closeable, Watcher { String childPath = (path.endsWith("/") ? path : path + "/") + child; watchRecursive(childPath); } + } catch (SessionExpiredException e) { + // TODO Can we safely ignore these? + LOG.debug(e.getMessage(), e); } catch (Exception e) { LOG.info(e.getMessage(), e); } @@ -241,6 +245,9 @@ public class ZookeeperEndpointRepository implements Closeable, Watcher { if (endpoint != null) { handleChanged(path, endpoint); } + } catch (SessionExpiredException e) { + // TODO Can we safely ignore these? + LOG.debug(e.getMessage(), e); } catch (Exception e) { LOG.info(e.getMessage(), e); }