فهرست منبع

Merge pull request #5337 from richardkchapman/roxie-write-error

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

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 11 سال پیش
والد
کامیت
3feaadd09d
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);
     }