You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/05/19 23:34:48 UTC

[2/4] incubator-trafodion git commit: [TRAFODION-1956] Timeout for arkcmp process Fixed a bug in the earlier commit

[TRAFODION-1956] Timeout for arkcmp process
Fixed a bug in the earlier commit


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

Branch: refs/heads/master
Commit: cea3a071cd90708524cbb8cefe0e9af0f98f1956
Parents: decb08c
Author: selvaganesang <se...@esgyn.com>
Authored: Wed May 18 02:21:34 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Wed May 18 02:21:34 2016 +0000

----------------------------------------------------------------------
 core/sql/cli/Context.cpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cea3a071/core/sql/cli/Context.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/Context.cpp b/core/sql/cli/Context.cpp
index 43360b1..af6496c 100644
--- a/core/sql/cli/Context.cpp
+++ b/core/sql/cli/Context.cpp
@@ -4945,21 +4945,21 @@ Lng32 parse_statsReq(short statsReqType,char *statsReqStr, Lng32 statsReqStrLen,
 void ContextCli::killIdleMxcmp() 
 {
   Int64 currentTimestamp = -1;
-  Int32 compilerIdleTimeout = getSessionDefaults()->getCompilerIdleTimeout();
+  Int32 compilerIdleTimeout;
   Int64 recentIpcTimestamp ;
  
-  if (compilerIdleTimeout == 0)
-     return;
- 
   if (arkcmpArray_.entries() == 0)
      return;
-  if (arkcmpArray_[0]->getServer() != NULL) {
-     if (currentTimestamp == -1)
-        currentTimestamp = NA_JulianTimestamp();
-     recentIpcTimestamp  = arkcmpArray_[0]->getRecentIpcTimestamp();
-     if (recentIpcTimestamp != -1 && (currentTimestamp - recentIpcTimestamp >= compilerIdleTimeout))
-        killAndRecreateMxcmp();
-  }
+  if (arkcmpArray_[0]->getServer() == NULL)
+     return;
+  compilerIdleTimeout = getSessionDefaults()->getCompilerIdleTimeout();
+  if (compilerIdleTimeout == 0)
+     return;
+  if (currentTimestamp == -1)
+     currentTimestamp = NA_JulianTimestamp();
+  recentIpcTimestamp  = arkcmpArray_[0]->getRecentIpcTimestamp();
+  if (recentIpcTimestamp != -1 && (((currentTimestamp - recentIpcTimestamp)/1000000)  >= compilerIdleTimeout))
+     killAndRecreateMxcmp();
 }
 
 void ContextCli::killAndRecreateMxcmp()