Skip to content

Commit

Permalink
HPCC-31983 Make iFile member of CFileOwner Linked rather than Owned
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Jun 3, 2024
1 parent 549d562 commit 5372fc6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion thorlcr/activities/hashdistrib/thhashdistribslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/activities/lookupjoin/thlookupjoinslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,7 @@ class CLookupJoinActivityBase : public CInMemJoinBase<HTHELPER, IHThorHashJoinAr
GetTempFilePath(tempFilename, "lookup_local");
ActPrintLog("Overflowing RHS broadcast rows to spill file: %s", tempFilename.str());
OwnedIFile iFile = createIFile(tempFilename.str());
overflowWriteFile.setown(new CFileOwner(iFile.getLink()));
overflowWriteFile.setown(new CFileOwner(iFile));
overflowWriteStream.setown(createRowWriter(iFile, queryRowInterfaces(rightITDL), rwFlags));

overflowWriteCount += rhsInRowsTemp.ordinality();
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/thorutil/thmem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ class CThorRowCollectorBase : public CSpillable
Owned<IFile> 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());
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/thorutil/thormisc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CFileSizeTracker> fileSizeTracker;
offset_t fileSize = 0;
public:
Expand Down

0 comments on commit 5372fc6

Please sign in to comment.