Skip to content

Commit

Permalink
HPCC-31684 Add workunit debug option 'isComplexCompile' to avoid loca…
Browse files Browse the repository at this point in the history
…l compile

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed May 3, 2024
1 parent c4ea62d commit 5989ae6
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions ecl/eclccserver/eclccserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,20 +897,6 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
DBGLOG("Compile request processing for workunit %s", wuid.get());
Owned<IPropertyTree> config = getComponentConfig();

if (isContainerized())
{
if (!useChildProcesses && !childProcessTimeLimit && !config->hasProp("@workunit"))
{
{
Owned<IWorkUnitFactory> factory = getWorkUnitFactory();
Owned<IWorkUnit> wu = factory->updateWorkUnit(wuid.get());
wu->setContainerizedProcessInfo("EclCCServer", getComponentConfigSP()->queryProp("@name"), k8s::queryMyPodName(), nullptr);
}
compileViaK8sJob(true);
return;
}
}

Owned<IWorkUnitFactory> factory = getWorkUnitFactory();
workunit.setown(factory->updateWorkUnit(wuid.get()));
if (!workunit)
Expand All @@ -919,6 +905,23 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
return;
}

if (isContainerized())
{
if (!useChildProcesses && !config->hasProp("@workunit"))
{
//If the timelimit for child processes is 0, or a workunit is explicitly defined as slow to compile
//then start the compile immediately using a K8s job.
if ((childProcessTimeLimit == 0) || workunit->getDebugValueBool("isComplexCompile", false))
{
//NOTE: This call does not modify the workunit itself, so no need to commit afterwards
workunit->setContainerizedProcessInfo("EclCCServer", getComponentConfigSP()->queryProp("@name"), k8s::queryMyPodName(), nullptr);
workunit.clear();
compileViaK8sJob(true);
return;
}
}
}

if (isContainerized())
workunit->setContainerizedProcessInfo("EclCC", getComponentConfigSP()->queryProp("@name"), k8s::queryMyPodName(), nullptr);

Expand All @@ -927,7 +930,6 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
workunit->setState(WUStateAborted);
DBGLOG("Workunit %s aborted", wuid.get());
workunit->commit();
workunit.clear();
return;
}

Expand Down

0 comments on commit 5989ae6

Please sign in to comment.