Skip to content

Commit

Permalink
HPCC-32930 Changes following code review
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Nov 7, 2024
1 parent 31d7794 commit a2a6508
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions thorlcr/activities/lookupjoin/thlookupjoinslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,14 +1445,17 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper<HELPER>,
}
HTHELPER *queryTable() { return table; }
IBitSet *queryRhsChannelStopSet() { dbgassertex(0 == queryJobChannelNumber()); return rhsChannelStop; }
void startLeftInput()
void startLeftInput(bool async=false)
{
try
{
if (async)
{
LookAheadTimer t(slaveTimerStats, timeActivities);
startInput(0);
}
else
startInput(0);
if (ensureStartFTLookAhead(0))
setLookAhead(0, createRowStreamLookAhead(this, inputStream, queryRowInterfaces(input), LOOKUPJOINL_SMART_BUFFER_SIZE, ::canStall(input), grouped, RCUNBOUND, this), false);
left.set(inputStream); // can be replaced by loader stream
Expand All @@ -1462,6 +1465,10 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper<HELPER>,
leftexception.setown(e);
}
}
void startLeftInputAsync()
{
startLeftInput(true);
}
virtual bool isRhsConstant() const { return rhsConstant; }

// IThorSlaveActivity overloaded methods
Expand Down Expand Up @@ -1533,6 +1540,7 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper<HELPER>,
}
virtual void start() override
{
ActivityTimer s(slaveTimerStats, timeActivities);
joined = 0;
joinCounter = 0;
candidateCounter = 0;
Expand Down Expand Up @@ -1565,10 +1573,9 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper<HELPER>,
}
else
{
CAsyncCallStart asyncLeftStart(std::bind(&CInMemJoinBase::startLeftInput, this));
CAsyncCallStart asyncLeftStart(std::bind(&CInMemJoinBase::startLeftInputAsync, this));
try
{
ActivityTimer timer(slaveTimerStats, timeActivities);
startInput(1);
rhsStartedBefore = true;
}
Expand Down

0 comments on commit a2a6508

Please sign in to comment.