فهرست منبع

Merge pull request #13187 from AttilaVamos/HPCC-23170-fix-7.6.x

HPCC-23170 DFU server should copy most file part attributes, except those it has to set, like size and filecrc

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 سال پیش
والد
کامیت
70d5ff22d1
2فایلهای تغییر یافته به همراه12 افزوده شده و 11 حذف شده
  1. 12 9
      dali/ft/filecopy.cpp
  2. 0 2
      testing/regress/ecl/split_test.ecl

+ 12 - 9
dali/ft/filecopy.cpp

@@ -3154,21 +3154,24 @@ void FileSprayer::updateTargetProperties()
 
                     curProps.setProp("@modified", temp.getString(timestr).str());
                 }
-                if (replicate && (distributedSource != distributedTarget) )
+                if ((distributedSource != distributedTarget) && (cur.whichInput != (unsigned)-1))
                 {
-                    assertex(cur.whichInput != (unsigned)-1);
                     FilePartInfo & curSource = sources.item(cur.whichInput);
                     if (curSource.properties)
                     {
                         Owned<IAttributeIterator> aiter = curSource.properties->getAttributes();
-                        //At the moment only clone the topLevelKey indicator (stored in kind), but make it easy to add others.
-                        ForEach(*aiter) {
+                        ForEach(*aiter)
+                        {
                             const char *aname = aiter->queryName();
-                            if (strieq(aname,"@kind")
-                                ) {
-                                if (!curProps.hasProp(aname))
-                                    curProps.setProp(aname,aiter->queryValue());
-                            }
+                            if ( !( strieq(aname,"@fileCrc") ||
+                                    strieq(aname,"@modified") ||
+                                    strieq(aname,"@node") ||
+                                    strieq(aname,"@num")  ||
+                                    strieq(aname,"@size") ||
+                                    strieq(aname,"@name") ) ||
+                                    ( strieq(aname,"@recordCount") && (sources.ordinality() == targets.ordinality()) )
+                               )
+                                curProps.setProp(aname,aiter->queryValue());
                         }
                     }
                 }

+ 0 - 2
testing/regress/ecl/split_test.ecl

@@ -511,8 +511,6 @@ res14 := gatherCounts(dst14[1].targetFilename, origRecCount, dst14[1].noSplit);
 
 sequential (
 #if (VERBOSE = 1)
-    output(pad),
-    output(length(pad)),
     output(dropzonePath, NAMED('dropzonePath')),
 #end