Repository: incubator-trafodion Updated Branches: refs/heads/master 9c2d9e148 -> acb7f2b6f
Fix reopened JIRA 1736 Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/0613c59b Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/0613c59b Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/0613c59b Branch: refs/heads/master Commit: 0613c59b9add3ee91a20cc7279c082631ec3afe3 Parents: 03a697d Author: venkat1m <[email protected]> Authored: Fri Jan 15 00:38:55 2016 +0000 Committer: venkat1m <[email protected]> Committed: Fri Jan 15 00:38:55 2016 +0000 ---------------------------------------------------------------------- .../main/java/org/trafodion/rest/RESTServlet.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0613c59b/core/rest/src/main/java/org/trafodion/rest/RESTServlet.java ---------------------------------------------------------------------- diff --git a/core/rest/src/main/java/org/trafodion/rest/RESTServlet.java b/core/rest/src/main/java/org/trafodion/rest/RESTServlet.java index 6ae343a..e846425 100644 --- a/core/rest/src/main/java/org/trafodion/rest/RESTServlet.java +++ b/core/rest/src/main/java/org/trafodion/rest/RESTServlet.java @@ -164,15 +164,15 @@ public class RESTServlet implements RestConstants { List<String> children = getChildren(parentZnode + Constants.DEFAULT_ZOOKEEPER_ZNODE_SERVERS_RUNNING, new RunningWatcher()); if( ! children.isEmpty()) { + //If dcsstop.sh is executed and rest server is not restarted, the nodes get appended to the + //existing list and we end with duplicate entries for the same servers with different timestamps + //Since the runningServers are only for the DcsServers, it is ok and not expensive to reconstruct + //the list every time + runningServers.clear(); + for(String child : children) { - - //If dcsstop.sh is executed and rest server is not restarted, the nodes get appended to the - //existing list and we end with duplicate entries for the same servers with different timestamps - //Since the runningServers are only for the DcsServers, it is ok and not expensive to reconstruct - //the list every time - runningServers.clear(); - - //If stop-dcs.sh is executed and DCS_MANAGES_ZK then zookeeper is stopped abruptly. + + //If stop-dcs.sh is executed and DCS_MANAGES_ZK then zookeeper is stopped abruptly. //Second scenario is when ZooKeeper fails for some reason regardless of whether DCS //manages it. When either happens the DcsServer running znodes still exist in ZooKeeper //and we see them at next startup. When they eventually timeout
