Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/488#discussion_r63736409
  
    --- Diff: core/sql/cli/Context.cpp ---
    @@ -4943,6 +4939,27 @@ Lng32 parse_statsReq(short statsReqType,char 
*statsReqStr, Lng32 statsReqStrLen,
         return -1;
       }
       return 0;
    +
    +}
    +
    +void ContextCli::killIdleMxcmp() 
    +{
    +  Int64 currentTimestamp = -1;
    +  Int32 compilerIdleTimeout;
    +  Int64 recentIpcTimestamp ;
    + 
    +  if (arkcmpArray_.entries() == 0)
    +     return;
    +  if (arkcmpArray_[0]->getServer() == NULL)
    +     return;
    +  compilerIdleTimeout = getSessionDefaults()->getCompilerIdleTimeout();
    +  if (compilerIdleTimeout == 0)
    +     return;
    +  if (currentTimestamp == -1)
    +     currentTimestamp = NA_JulianTimestamp();
    --- End diff --
    
    No need to test currentTimestamp == -1, as it is initialized to -1; the 
'if' is always true. Why not just initialize currentTimestamp to 
NA_JulianTimestamp? (Of course in the release build, the C++ compiler will 
optimize this out, but perhaps we can make it easier for the human reader.)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to