Sfoglia il codice sorgente

HPCC-14140 Potential thread and socket leak from cacheFileConnect

Changes following review.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 anni fa
parent
commit
1727a5b501

+ 0 - 14
initfiles/componentfiles/configxml/roxie.xsd.in

@@ -706,13 +706,6 @@
         </xs:appinfo>
       </xs:annotation>
     </xs:attribute>
-    <xs:attribute name="remoteConnectTimeout" type="xs:integer" use="optional" default="10000">
-      <xs:annotation>
-        <xs:appinfo>
-          <tooltip>Timeout (in ms) for remote file connections</tooltip>
-        </xs:appinfo>
-      </xs:annotation>
-    </xs:attribute>
     <xs:attribute name="remoteFilesExpire" type="xs:integer" use="optional" default="3600000">
       <xs:annotation>
         <xs:appinfo>
@@ -720,13 +713,6 @@
         </xs:appinfo>
       </xs:annotation>
     </xs:attribute>
-    <xs:attribute name="remoteReadTimeout" type="xs:integer" use="optional" default="0">
-      <xs:annotation>
-        <xs:appinfo>
-          <tooltip>Timeout (in ms) for remote file reads</tooltip>
-        </xs:appinfo>
-      </xs:annotation>
-    </xs:attribute>
     <xs:attribute name="serverThreads" type="xs:nonNegativeInteger" use="optional" default="30">
       <xs:annotation>
         <xs:appinfo>

+ 1 - 3
roxie/ccd/ccdmain.cpp

@@ -678,9 +678,6 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
         lowTimeout = topology->getPropInt("@lowTimeout", 10000);
         highTimeout = topology->getPropInt("@highTimeout", 2000);
         slaTimeout = topology->getPropInt("@slaTimeout", 2000);
-        unsigned remoteConnectTimeout = topology->getPropInt("@remoteConnectTimeout", 10000);
-        unsigned remoteReadTimeout = topology->getPropInt("@remoteReadTimeout", 0);
-        setRemoteFileTimeouts(remoteConnectTimeout, remoteReadTimeout);
         parallelLoopFlowLimit = topology->getPropInt("@parallelLoopFlowLimit", 100);
         perChannelFlowLimit = topology->getPropInt("@perChannelFlowLimit", 10);
         copyResources = topology->getPropBool("@copyResources", true);
@@ -822,6 +819,7 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
         maxFilesOpen[false] = topology->getPropInt("@maxLocalFilesOpen", 4000);
         maxFilesOpen[true] = topology->getPropInt("@maxRemoteFilesOpen", 1000);
         dafilesrvLookupTimeout = topology->getPropInt("@dafilesrvLookupTimeout", 10000);
+        setRemoteFileTimeouts(dafilesrvLookupTimeout, 0);
         topology->getProp("@daliServers", fileNameServiceDali);
         trapTooManyActiveQueries = topology->getPropBool("@trapTooManyActiveQueries", true);
         maxEmptyLoopIterations = topology->getPropInt("@maxEmptyLoopIterations", 1000);

+ 2 - 0
roxie/ccd/ccdstate.cpp

@@ -36,6 +36,7 @@
 #include "eclrtl.hpp"
 #include "dafdesc.hpp"
 #include "dautils.hpp"
+#include "rmtfile.hpp"
 
 #include "pkgimpl.hpp"
 #include "roxiehelper.hpp"
@@ -2107,6 +2108,7 @@ private:
             {
                 dafilesrvLookupTimeout = control->getPropInt("@val", 10000);
                 topology->setPropInt("@dafilesrvLookupTimeout", dafilesrvLookupTimeout);
+                setRemoteFileTimeouts(dafilesrvLookupTimeout, 0);
             }
             else if (stricmp(queryName, "control:defaultConcatPreload")==0)
             {