Quellcode durchsuchen

HPCC-13897 Spray ignoring replication=false and creating logical files
flagged as replicated

Set defaultCopies = DFD_NoCopies if not replicate a file.

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>

Attila Vamos vor 9 Jahren
Ursprung
Commit
433b0d7d89
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. 6 0
      esp/services/ws_fs/ws_fsService.cpp

+ 6 - 0
esp/services/ws_fs/ws_fsService.cpp

@@ -1921,6 +1921,8 @@ bool CFileSprayEx::onSprayFixed(IEspContext &context, IEspSprayFixed &req, IEspS
         destination->getClusterPartDiskMapSpec(gName.str(), mspec);
         mspec.setDefaultBaseDir(defaultFolder.str());
         mspec.setDefaultReplicateDir(defaultReplicateFolder.str());
+        if (!req.getReplicate())
+            mspec.defaultCopies = DFD_NoCopies;
         destination->setClusterPartDiskMapSpec(gName.str(), mspec);
 
         int repo = req.getReplicateOffset();
@@ -2101,6 +2103,8 @@ bool CFileSprayEx::onSprayVariable(IEspContext &context, IEspSprayVariable &req,
         destination->getClusterPartDiskMapSpec(gName.str(), mspec);
         mspec.setDefaultBaseDir(defaultFolder.str());
         mspec.setDefaultReplicateDir(defaultReplicateFolder.str());
+        if (!req.getReplicate())
+            mspec.defaultCopies = DFD_NoCopies;
         destination->setClusterPartDiskMapSpec(gName.str(), mspec);
         const char * encryptkey = req.getEncrypt();
         if(req.getCompress()||(encryptkey&&*encryptkey))
@@ -2530,6 +2534,8 @@ bool CFileSprayEx::onCopy(IEspContext &context, IEspCopy &req, IEspCopyResponse
             wuFSpecDest->getClusterPartDiskMapSpec(destNodeGroup.str(), mspec);
             mspec.setDefaultBaseDir(defaultFolder.str());
             mspec.setDefaultReplicateDir(defaultReplicateFolder.str());
+            if (!req.getReplicate())
+                mspec.defaultCopies = DFD_NoCopies;
             wuFSpecDest->setClusterPartDiskMapSpec(destNodeGroup.str(), mspec);
         }