Skip to content

Commit

Permalink
HPCC-32937 Capture and report lookahead for FetchActivity
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Nov 4, 2024
1 parent 0e602df commit 89740c4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions thorlcr/activities/fetch/thfetchslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CFetchStream : public IRowStream, implements IStopInput, implements IFetch
bool abortSoon;
mptag_t tag;
Owned<IRowStream> keyOutStream;
CActivityBase &owner;
CSlaveActivity &owner;
Linked<IThorRowInterfaces> keyRowIf, fetchRowIf;
StringAttr logicalFilename;

Expand Down Expand Up @@ -124,7 +124,7 @@ class CFetchStream : public IRowStream, implements IStopInput, implements IFetch
public:
IMPLEMENT_IINTERFACE_USING(CSimpleInterface);

CFetchStream(CActivityBase &_owner, IThorRowInterfaces *_keyRowIf, IThorRowInterfaces *_fetchRowIf, bool &_abortSoon, const char *_logicalFilename, CPartDescriptorArray &_parts, unsigned _offsetCount, size32_t offsetMapSz, const void *offsetMap, IFetchHandler *_iFetchHandler, mptag_t _tag, IExpander *_eexp)
CFetchStream(CSlaveActivity &_owner, IThorRowInterfaces *_keyRowIf, IThorRowInterfaces *_fetchRowIf, bool &_abortSoon, const char *_logicalFilename, CPartDescriptorArray &_parts, unsigned _offsetCount, size32_t offsetMapSz, const void *offsetMap, IFetchHandler *_iFetchHandler, mptag_t _tag, IExpander *_eexp)
: owner(_owner), keyRowIf(_keyRowIf), fetchRowIf(_fetchRowIf), abortSoon(_abortSoon), logicalFilename(_logicalFilename),
iFetchHandler(_iFetchHandler), offsetCount(_offsetCount), tag(_tag), eexp(_eexp)
{
Expand Down Expand Up @@ -220,7 +220,11 @@ class CFetchStream : public IRowStream, implements IStopInput, implements IFetch

for (;;)
{
OwnedConstThorRow keyRec = keyOutStream->nextRow(); // is this right?
OwnedConstThorRow keyRec;
{
LookAheadTimer t(owner.getActivityTimerAccumulator(), owner.queryTimeActivities());
keyRec.setown(keyOutStream->nextRow()); // is this right?
}
if (!keyRec)
break;

Expand Down

0 comments on commit 89740c4

Please sign in to comment.