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-31684 Add workunit debug option 'isComplexCompile' to avoid local compile #18592

Merged
merged 1 commit into from
May 7, 2024
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
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
Loading