浏览代码

HPCC-10776 Spurious "Cannot write file" errors from Roxie

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 年之前
父节点
当前提交
8f01110f33
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      roxie/ccd/ccdstate.cpp

+ 4 - 4
roxie/ccd/ccdstate.cpp

@@ -501,13 +501,13 @@ public:
                 fileName.clear().append(resolved->queryPhysicalName());
             resolved.clear();
         }
+        else
+            throw MakeStringException(ROXIE_FILE_ERROR, "Cannot write %s", fileName.str());
+        // filename by now is a local filename
         Owned<IRoxieDaliHelper> daliHelper = connectToDali();
-        bool disconnected = !daliHelper->connected();
-        // MORE - not sure this is really the right test. If there SHOULD be a dali but is's unavailable, we should fail.
-        Owned<ILocalOrDistributedFile> ldFile = createLocalOrDistributedFile(fileName, NULL, disconnected, !disconnected, true);
+        Owned<ILocalOrDistributedFile> ldFile = createLocalOrDistributedFile(fileName, NULL, true, false, true);
         if (!ldFile)
             throw MakeStringException(ROXIE_FILE_ERROR, "Cannot write %s", fileName.str());
-
         return createRoxieWriteHandler(daliHelper, ldFile.getClear(), clusters);
     }