[TRAFODION-1956] Timeout for arkcmp process Changes as per the review comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7066f185 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7066f185 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7066f185 Branch: refs/heads/master Commit: 7066f18556ad0d498ce1d7acd070f458ebb3acb6 Parents: cea3a07 Author: selvaganesang <[email protected]> Authored: Wed May 18 17:44:40 2016 +0000 Committer: selvaganesang <[email protected]> Committed: Wed May 18 17:44:40 2016 +0000 ---------------------------------------------------------------------- core/sql/cli/Context.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7066f185/core/sql/cli/Context.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/Context.cpp b/core/sql/cli/Context.cpp index af6496c..0192dc0 100644 --- a/core/sql/cli/Context.cpp +++ b/core/sql/cli/Context.cpp @@ -4944,7 +4944,7 @@ Lng32 parse_statsReq(short statsReqType,char *statsReqStr, Lng32 statsReqStrLen, void ContextCli::killIdleMxcmp() { - Int64 currentTimestamp = -1; + Int64 currentTimestamp; Int32 compilerIdleTimeout; Int64 recentIpcTimestamp ; @@ -4955,8 +4955,7 @@ void ContextCli::killIdleMxcmp() compilerIdleTimeout = getSessionDefaults()->getCompilerIdleTimeout(); if (compilerIdleTimeout == 0) return; - if (currentTimestamp == -1) - currentTimestamp = NA_JulianTimestamp(); + currentTimestamp = NA_JulianTimestamp(); recentIpcTimestamp = arkcmpArray_[0]->getRecentIpcTimestamp(); if (recentIpcTimestamp != -1 && (((currentTimestamp - recentIpcTimestamp)/1000000) >= compilerIdleTimeout)) killAndRecreateMxcmp();
