Explorar o código

HPCC-13526 Writing to file fails in roxie stand alone mode

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=10) %!d(string=hai) anos
pai
achega
0dd39837cb
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  1. 1 1
      roxie/ccd/ccdmain.cpp
  2. 3 1
      roxie/ccd/ccdstate.cpp

+ 1 - 1
roxie/ccd/ccdmain.cpp

@@ -506,7 +506,7 @@ int STARTQUERY_API start_query(int argc, const char *argv[])
                 throw MakeStringException(ROXIE_INVALID_TOPOLOGY, "topology file %s not found", topologyFile.str());
             }
             topology=createPTreeFromXMLString(
-                "<RoxieTopology allFilesDynamic='1' localSlave='1'>"
+                "<RoxieTopology allFilesDynamic='1' localSlave='1' resolveLocally='1'>"
                 " <RoxieFarmProcess/>"
                 " <RoxieServerProcess netAddress='.'/>"
                 "</RoxieTopology>"

+ 3 - 1
roxie/ccd/ccdstate.cpp

@@ -713,7 +713,9 @@ public:
             throw MakeStringException(ROXIE_FILE_ERROR, "Cannot write %s", fileName.str());
         // filename by now may be a local filename, or a dali one
         Owned<IRoxieDaliHelper> daliHelper = connectToDali();
-        Owned<ILocalOrDistributedFile> ldFile = createLocalOrDistributedFile(fileName, NULL, false, !resolveLocally(), true);
+        bool onlyLocal = fileNameServiceDali.isEmpty();
+        bool onlyDFS = !resolveLocally() && !onlyLocal;
+        Owned<ILocalOrDistributedFile> ldFile = createLocalOrDistributedFile(fileName, NULL, onlyLocal, onlyDFS, true);
         if (!ldFile)
             throw MakeStringException(ROXIE_FILE_ERROR, "Cannot write %s", fileName.str());
         return createRoxieWriteHandler(daliHelper, ldFile.getClear(), clusters);