Skip to content

Commit

Permalink
Merge pull request #18776 from jakesmith/HPCC-31116-cq-1minstall
Browse files Browse the repository at this point in the history
HPCC-31116 Fix 1 min delay introduced waiting for some CQ's

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Jun 20, 2024
2 parents dee6638 + 5a9d689 commit b2592ee
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions thorlcr/graph/thgraphslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1222,30 +1222,36 @@ void CSlaveGraph::executeSubGraph(size32_t parentExtractSz, const byte *parentEx

void CSlaveGraph::abort(IException *e)
{
if (aborted)
return;
if (!graphDone) // set pre done(), no need to abort if got that far.
CGraphBase::abort(e);
getDoneSem.signal();
}

void CSlaveGraph::done()
{
GraphPrintLog("End of sub-graph");
progressActive.store(false);
setProgressUpdated(); // NB: ensure collected after end of graph
if (!queryOwner() || isGlobal())
if (started)
{
if (aborted || !graphDone)
GraphPrintLog("End of sub-graph");
progressActive.store(false);
setProgressUpdated(); // NB: ensure collected after end of graph

if (initialized && (!queryOwner() || isGlobal()))
{
if (!getDoneSem.wait(SHORTTIMEOUT)) // wait on master to clear up, gather info from slaves
WARNLOG("CSlaveGraph::done - timedout waiting for master to signal done()");
if (aborted || !graphDone)
{
if (!getDoneSem.wait(SHORTTIMEOUT)) // wait on master to clear up, gather info from slaves
WARNLOG("CSlaveGraph::done - timedout waiting for master to signal done()");
}
else
getDoneSem.wait();
}
if (!queryOwner())
{
if (globals->getPropBool("@watchdogProgressEnabled"))
jobS->queryProgressHandler()->stopGraph(*this, NULL);
}
else
getDoneSem.wait();
}
if (!queryOwner())
{
if (globals->getPropBool("@watchdogProgressEnabled"))
jobS->queryProgressHandler()->stopGraph(*this, NULL);
}

Owned<IException> exception;
Expand Down

0 comments on commit b2592ee

Please sign in to comment.