From 80ff0bfa56d0e01923feef753f85840149aac13c Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Mon, 6 Jan 2020 14:17:43 -0500 Subject: [PATCH] Fixed a couple minor things I ran into working on another task - Made TupleUnion not allocate 64MB per frame. - Saw a crash, where a THJS would be destroyed w/o being used. Fixed the bad reference. --- dbcon/joblist/tuplehashjoin.cpp | 5 +++-- dbcon/joblist/tupleunion.cpp | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbcon/joblist/tuplehashjoin.cpp b/dbcon/joblist/tuplehashjoin.cpp index ebc657d58..1f164a11f 100644 --- a/dbcon/joblist/tuplehashjoin.cpp +++ b/dbcon/joblist/tuplehashjoin.cpp @@ -132,8 +132,9 @@ TupleHashJoinStep::~TupleHashJoinStep() if (ownsOutputDL) delete outputDL; - for (uint i = 0 ; i < smallDLs.size(); i++) - resourceManager->returnMemory(memUsedByEachJoin[i], sessionMemLimit); + if (memUsedByEachJoin) + for (uint i = 0 ; i < smallDLs.size(); i++) + resourceManager->returnMemory(memUsedByEachJoin[i], sessionMemLimit); //cout << "deallocated THJS, UM memory available: " << resourceManager.availableMemory() << endl; } diff --git a/dbcon/joblist/tupleunion.cpp b/dbcon/joblist/tupleunion.cpp index f62c94b9d..85f90860b 100644 --- a/dbcon/joblist/tupleunion.cpp +++ b/dbcon/joblist/tupleunion.cpp @@ -94,7 +94,6 @@ TupleUnion::TupleUnion(CalpontSystemCatalog::OID tableOID, const JobInfo& jobInf outputIt(-1), memUsage(0), rm(jobInfo.rm), - allocator(64 * 1024 * 1024 + 1), runnersDone(0), distinctCount(0), distinctDone(0),