Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32930 Capture and report start timings for activities derived from CInMemJoinBase #19261

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions thorlcr/activities/lookupjoin/thlookupjoinslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,11 +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
{
startInput(0);
if (async)
{
LookAheadTimer t(slaveTimerStats, timeActivities);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't necessarily look ahead time, startLeftInput() can be called synchronously:

        if (rhsStartedBefore && isRhsConstant()) // if this is the 2nd+ iteration and the RHS is constant, don't bother restarting right, it will not be used.
        {
            startLeftInput();
        }
        else
        {
            CAsyncCallStart asyncLeftStart(std::bind(&CInMemJoinBase::startLeftInput, this));

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 Down Expand Up @@ -1530,6 +1536,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 @@ -1562,7 +1569,7 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper<HELPER>,
}
else
{
CAsyncCallStart asyncLeftStart(std::bind(&CInMemJoinBase::startLeftInput, this));
CAsyncCallStart asyncLeftStart(std::bind(&CInMemJoinBase::startLeftInput, this, true));
try
{
startInput(1);
Expand Down
Loading