You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2017/05/31 18:47:09 UTC

[08/50] [abbrv] incubator-trafodion git commit: Fix to sqlci abort on added node.

Fix to sqlci abort on added node.


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

Branch: refs/heads/master
Commit: bcda47cb88791ca6b2508873f6e28bf2fa6a408b
Parents: 3f37b56
Author: Zalo Correa <za...@esgyn.com>
Authored: Thu Aug 11 15:38:22 2016 -0700
Committer: Zalo Correa <za...@esgyn.com>
Committed: Thu Aug 11 15:38:22 2016 -0700

----------------------------------------------------------------------
 core/sql/qmscommon/QRLogger.cpp | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bcda47cb/core/sql/qmscommon/QRLogger.cpp
----------------------------------------------------------------------
diff --git a/core/sql/qmscommon/QRLogger.cpp b/core/sql/qmscommon/QRLogger.cpp
index 364c0d2..a4d2e15 100644
--- a/core/sql/qmscommon/QRLogger.cpp
+++ b/core/sql/qmscommon/QRLogger.cpp
@@ -153,26 +153,23 @@ void getMyNidSuffix(char stringNidSuffix[])
   myPhandle.decompose();
   
   char processName[MS_MON_MAX_PROCESS_NAME + 1];
-  
 
   memset(processName, 0, sizeof(processName));
   memcpy(processName, myPhandle.getPhandleString(), myPhandle.getPhandleStringLen());
-  memset(processName, 0, sizeof(processName));
-  memcpy(processName, myPhandle.getPhandleString(), myPhandle.getPhandleStringLen());
-
- 
 
   MS_Mon_Process_Info_Type procInfo;
   Int32 rc = 0;
 
   Int32 myNid = 0;
   
-  do
-  {
-     rc = msg_mon_get_process_info_detail(processName, &procInfo);
-     myNid = procInfo.nid;
-   
-  } while ((rc == XZFIL_ERR_OK) && (procInfo.parent_nid != -1) && (procInfo.parent_pid != -1));
+  rc = msg_mon_get_process_info_detail(processName, &procInfo);
+  if (rc != 0) {
+    // at least let the logging proceed
+    myNid = 9999;
+  }
+  else {
+    myNid = procInfo.nid;
+  }
 
   snprintf (stringNidSuffix, 5+sizeof(Int32), "_%d.log", myNid);
 }