From 5372fc628e77d80791ee98a33c933b62c14e38a2 Mon Sep 17 00:00:00 2001 From: Shamser Ahmed Date: Mon, 3 Jun 2024 14:09:34 +0100 Subject: [PATCH] HPCC-31983 Make iFile member of CFileOwner Linked rather than Owned Signed-off-by: Shamser Ahmed --- thorlcr/activities/hashdistrib/thhashdistribslave.cpp | 2 +- thorlcr/activities/lookupjoin/thlookupjoinslave.cpp | 2 +- thorlcr/thorutil/thmem.cpp | 2 +- thorlcr/thorutil/thormisc.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/thorlcr/activities/hashdistrib/thhashdistribslave.cpp b/thorlcr/activities/hashdistrib/thhashdistribslave.cpp index 5f543423889..6fcc98f6903 100644 --- a/thorlcr/activities/hashdistrib/thhashdistribslave.cpp +++ b/thorlcr/activities/hashdistrib/thhashdistribslave.cpp @@ -2727,7 +2727,7 @@ class CSpill : implements IRowWriter, public CSimpleInterface prefix.append(bucketN).append('_').append(desc); GetTempFilePath(tempname, prefix.str()); OwnedIFile iFile = createIFile(tempname.str()); - spillFile.setown(new CFileOwner(iFile.getLink(), tempFileSizeTracker)); + spillFile.setown(new CFileOwner(iFile, tempFileSizeTracker)); if (owner.getOptBool(THOROPT_COMPRESS_SPILLS, true)) { rwFlags |= rw_compress; diff --git a/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp b/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp index 47d4835213f..c62c2d86758 100644 --- a/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp +++ b/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp @@ -2944,7 +2944,7 @@ class CLookupJoinActivityBase : public CInMemJoinBase iFile = createIFile(tempName.str()); VStringBuffer spillPrefixStr("%sRowCollector(%d)", tracingPrefix.str(), spillPriority); spillableRows.save(*iFile, spillCompInfo, false, spillPrefixStr.str()); // saves committed rows - spillFiles.append(new CFileOwner(iFile.getLink())); + spillFiles.append(new CFileOwner(iFile)); ++overflowCount; statOverflowCount.fastAdd(1); // NB: this is total over multiple uses of this class statSizeSpill.fastAdd(iFile->size()); diff --git a/thorlcr/thorutil/thormisc.hpp b/thorlcr/thorutil/thormisc.hpp index 73d57dbea31..d342c950633 100644 --- a/thorlcr/thorutil/thormisc.hpp +++ b/thorlcr/thorutil/thormisc.hpp @@ -340,7 +340,7 @@ class CFileSizeTracker: public CInterface // simple class which takes ownership of the underlying file and deletes it on destruction class graph_decl CFileOwner : public CSimpleInterface, implements IInterface { - OwnedIFile iFile; + IFileAttr iFile; Linked fileSizeTracker; offset_t fileSize = 0; public: