-
Notifications
You must be signed in to change notification settings - Fork 307
HPCC-33568 Introduce a lingering c++ compile #19869
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
Conversation
@jakesmith code is written, compiled, but untested. Pushed for initial test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements changes to the HPCC C++ compiler infrastructure by refining containerized behavior and introducing a lingering compile server mode. Key changes include:
- Adjusting job argument construction in jcontainerized.cpp to conditionally include workunit parameters.
- Refactoring eclccserver.cpp to separate compilation logic into new classes (EclccCompiler, EclccLingeringCompiler) and improving behavior when running containerized compilations.
- Adding a new macro and helper function in daqueue.hpp to support compile queue naming for the lingering server.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
system/jlib/jcontainerized.cpp | Updated job argument generation to conditionally include the workunit parameter. |
ecl/eclccserver/eclccserver.cpp | Refactored compile thread logic with new compiler classes and adjusted K8s job flow. |
dali/base/daqueue.hpp | Introduced a new compile queue extension macro and helper function. |
Comments suppressed due to low confidence (1)
ecl/eclccserver/eclccserver.cpp:970
- The call to runJob now passes a nullptr for the workunit identifier instead of the previous wuid. Ensure that this change is intentional and that the runJob function handles a null workunit correctly for lingering compile requests.
k8s::runJob("compile", nullptr, jobName, params);
//If the process is killed it is probably because it ran out of memory - so try to compile as a K8s job | ||
timedOut = abortWaiter.stop() || (isContainerized() && processKilled); | ||
bool timedOut = abortWaiter.stop() || (isContainerized() && processKilled); | ||
if (!timedOut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The declaration of 'bool timedOut' within the compile method may be confusing since it replaces the previous out parameter usage. Consider updating related comments or variable names to clarify its intent.
Copilot uses AI. Check for mistakes.
ecl/eclccserver/eclccserver.cpp
Outdated
|
||
__uint64 executeTimeNs = waitTimer.elapsedNs() - waitTimeNs; | ||
cost_type costExecute = money2cost_type(calcCostNs(costPerHour, executeTimeNs)); | ||
const char * username = "MORE"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The use of the hardcoded username 'MORE' for metrics recording might be a placeholder. Consider revisiting this value to use a dynamic or more descriptive identifier if applicable.
const char * username = "MORE"; | |
const char * username = globals->queryProp("@username"); | |
if (!username || !*username) | |
username = "unknown"; |
Copilot uses AI. Check for mistakes.
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33568 Jirabot Action Result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghalliday - looks good, didn't spot any problems, 1 minor question.
compileViaK8sJob(true); | ||
return; | ||
} | ||
//NOTE: This call does not modify the workunit itself, so no need to commit afterwards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this comment means.. the line below is altering the workunit and the workunit.clear() will commit won't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghalliday - still not sure re. this comment, is it misplaced? setContainerizedProcessInfo does alter the workunit..
I may have accidentally merged some of the follow up changes into the second commit. |
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33568 Jirabot Action Result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghalliday - looks good, some v. minor comments
ecl/eclccserver/eclccserver.cpp
Outdated
workunit->commit(); | ||
result = workunit->getState(); | ||
} | ||
|
||
workunit.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: could be inside the if (workunit) block
workunit->commit(); | ||
result = workunit->getState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: I don't think it matters that after the commit(), but as coded, makes it looks like it is significant?
|
||
public: | ||
EclccLingeringCompiler(IPropertyTree * globals, unsigned _idx) | ||
: instanceName(globals->queryProp("@name")), compiler(instanceName, _idx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know 'globals' is in scope in the context EclccLingeringCompiler is used.. but it looks unsafe to keep pointer to @name here, for clarify, future safety, is it worth storing in a StringAttr despite not being strictly being necessary at the moment?
compileViaK8sJob(true); | ||
return; | ||
} | ||
//NOTE: This call does not modify the workunit itself, so no need to commit afterwards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghalliday - still not sure re. this comment, is it misplaced? setContainerizedProcessInfo does alter the workunit..
Signed-off-by: Gavin Halliday <[email protected]>
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: