From 7fd4503346d52c3f58bfa90e2e0da190717e2b65 Mon Sep 17 00:00:00 2001 From: Shamser Ahmed Date: Thu, 3 Oct 2024 13:10:01 +0100 Subject: [PATCH] HPCC-32922 Capture lookahead timings for join and keyedjoin activities Signed-off-by: Shamser Ahmed --- thorlcr/activities/join/thjoinslave.cpp | 2 +- thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/thorlcr/activities/join/thjoinslave.cpp b/thorlcr/activities/join/thjoinslave.cpp index f2262256ab7..f6e11533003 100644 --- a/thorlcr/activities/join/thjoinslave.cpp +++ b/thorlcr/activities/join/thjoinslave.cpp @@ -265,8 +265,8 @@ class JoinSlaveActivity : public CSlaveActivity, implements ILookAheadStopNotify { try { + LookAheadTimer t(slaveTimerStats, timeActivities); startInput(secondaryInputIndex); - if (ensureStartFTLookAhead(secondaryInputIndex)) { IThorDataLink *secondaryInput = queryInput(secondaryInputIndex); diff --git a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp index 46e7a05302c..b27bf59be4b 100644 --- a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp +++ b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp @@ -2675,13 +2675,18 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem { if (queryAbortSoon()) break; - OwnedConstThorRow lhsRow = inputStream->nextRow(); - if (!lhsRow) + OwnedConstThorRow lhsRow; { - groupStart = nullptr; // NB: only ever set if preserveGroups on + LookAheadTimer t(slaveTimerStats, timeActivities); + lhsRow.setown(inputStream->nextRow()); if (!lhsRow) - break; + { + groupStart = nullptr; // NB: only ever set if preserveGroups on + lhsRow.setown(inputStream->nextRow()); + if (!lhsRow) + break; + } } Linked jg; if (helper->leftCanMatch(lhsRow))