Skip to content

Commit

Permalink
HPCC-32896 Fix Roxie clone file TLK meta loss bug
Browse files Browse the repository at this point in the history
Roxie's clone file code was not copying the kind attribute from
the source file. This meant the meta info for the TLK part was
lost.

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
  • Loading branch information
jakesmith authored and ghalliday committed Oct 29, 2024
1 parent 041b75b commit 53a08ff
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions dali/dfu/dfuutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,18 @@ class CFileCloner
if (iskey&&!cluster2.isEmpty())
dstfdesc->addCluster(cluster2,grp2,spec2);

for (unsigned pn=0; pn<numParts; pn++) {
offset_t sz = srcfdesc->queryPart(pn)->queryProperties().getPropInt64("@size",-1);
for (unsigned pn=0; pn<numParts; pn++)
{
IPropertyTree &srcProps = srcfdesc->queryPart(pn)->queryProperties();
IPropertyTree &dstProps = dstfdesc->queryPart(pn)->queryProperties();
offset_t sz = srcProps.getPropInt64("@size",-1);
if (sz!=(offset_t)-1)
dstfdesc->queryPart(pn)->queryProperties().setPropInt64("@size",sz);
dstProps.setPropInt64("@size",sz);
StringBuffer dates;
if (srcfdesc->queryPart(pn)->queryProperties().getProp("@modified",dates))
dstfdesc->queryPart(pn)->queryProperties().setProp("@modified",dates.str());
if (srcProps.getProp("@modified",dates))
dstProps.setProp("@modified",dates.str());
if (srcProps.hasProp("@kind"))
dstProps.setProp("@kind", srcProps.queryProp("@kind"));
}

if (!copyphysical) //cloneFrom tells roxie where to copy from.. it's unnecessary if we already did the copy
Expand Down

0 comments on commit 53a08ff

Please sign in to comment.