You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2018/06/15 18:58:45 UTC

[1/2] trafodion git commit: [TRAFODION-2668] fix nid been accidentally deleted

Repository: trafodion
Updated Branches:
  refs/heads/master 877339a11 -> 8001c1549


[TRAFODION-2668] fix nid been accidentally deleted


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/2713db93
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/2713db93
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/2713db93

Branch: refs/heads/master
Commit: 2713db93dadaa943b9a3d1d79bbc10b1954cf223
Parents: 98b3ac3
Author: aven <sh...@esgyn.cn>
Authored: Wed Jun 13 16:54:59 2018 +0800
Committer: aven <sh...@esgyn.cn>
Committed: Wed Jun 13 16:54:59 2018 +0800

----------------------------------------------------------------------
 .../java/org/trafodion/dcs/server/ServerManager.java  | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/2713db93/dcs/src/main/java/org/trafodion/dcs/server/ServerManager.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/server/ServerManager.java b/dcs/src/main/java/org/trafodion/dcs/server/ServerManager.java
index aa7e0ad..e5947c8 100644
--- a/dcs/src/main/java/org/trafodion/dcs/server/ServerManager.java
+++ b/dcs/src/main/java/org/trafodion/dcs/server/ServerManager.java
@@ -83,7 +83,7 @@ public final class ServerManager implements Callable {
     private ServerHandler[] serverHandlers;
     private int maxRestartAttempts;
     private int retryIntervalMillis;
-    private String nid = null;
+//    private String nid = null;
     private static String userProgKeepaliveStatus;
     private static int userProgKeepaliveIdletime;
     private static int userProgKeepaliveIntervaltime;
@@ -423,12 +423,9 @@ public final class ServerManager implements Callable {
             featureCheck();
             registerInRunning(instance);
             RetryCounter retryCounter = RetryCounterFactory.create(maxRestartAttempts, retryIntervalMillis);
-            while (!isTrafodionRunning(nid)) {
+            while (!isTrafodionRunning(null)) {
                if (!retryCounter.shouldRetry()) {
-                  if (nid != null)
-                     throw new IOException("Node " + nid + " is not Up");
-                  else
-                     throw new IOException("Trafodion is not running");
+                  throw new IOException("Trafodion is not running");
                } else {
                   retryCounter.sleepUntilNextRetry();
                   retryCounter.useRetry();
@@ -464,6 +461,9 @@ public final class ServerManager implements Callable {
                     LOG.info("Server handler [" + instance + ":" + result + "] exit");
 
                     retryCounter = RetryCounterFactory.create(maxRestartAttempts, retryIntervalMillis);
+                    int childInstance = result.intValue();
+                    ServerHandler previousServerHandler = serverHandlers[childInstance - 1];
+                    String nid = serverHandlers[childInstance - 1].serverMonitor.nid;
                     while (!isTrafodionRunning(nid)) {
                         if (!retryCounter.shouldRetry()) {
                             throw new IOException("Node " + nid + " is not Up");
@@ -472,9 +472,7 @@ public final class ServerManager implements Callable {
                             retryCounter.useRetry();
                         }
                     }
-                    int childInstance = result.intValue();
                     // get the node id
-                    ServerHandler previousServerHandler = serverHandlers[childInstance - 1];
                     if (previousServerHandler.retryCounter.shouldRetryInnerMinutes()) {
                         serverHandlers[childInstance - 1] = previousServerHandler;
                         completionService.submit(serverHandlers[childInstance - 1]);


[2/2] trafodion git commit: Merge remote branch 'origin/pr/1607/head' into merge_1607

Posted by sa...@apache.org.
Merge remote branch 'origin/pr/1607/head' into merge_1607


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/8001c154
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/8001c154
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/8001c154

Branch: refs/heads/master
Commit: 8001c1549deefa77ac7bdf379a4b1f4bbdb5aa3f
Parents: 877339a 2713db9
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Fri Jun 15 18:58:20 2018 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Fri Jun 15 18:58:20 2018 +0000

----------------------------------------------------------------------
 .../java/org/trafodion/dcs/server/ServerManager.java  | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------