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-31116 Fix 1 min delay introduced waiting for some CQ's #18776

Merged
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
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
Loading