-
Notifications
You must be signed in to change notification settings - Fork 304
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-30429 Fix WsECL display for 'Create Workunit' option #17887
Conversation
https://track.hpccsystems.com/browse/HPCC-30429 |
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.
@wangkx one comment on naming, otherwise looks good.
@@ -2134,8 +2139,18 @@ void CWsEclBinding::sendRoxieRequest(const char *target, StringBuffer &req, Stri | |||
} | |||
} | |||
|
|||
static void checkForceCreateWorkunit(IEspContext &context, bool forceCreateWorkunit) |
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.
@wangkx I think I now regret the flag being called "forceCreateWorkunit". So for the check method maybe we can use a better name. Perhaps "checkWorkunitCompatibleOptions()"? And just for this function you can use a different name for the flag.. "bool submitWorkunit"?
bool statsToWorkunit = context.queryRequestParameters()->getPropBool("@statsToWorkunit", false); | ||
bool summaryStats = context.queryRequestParameters()->getPropBool("@summaryStats", false); | ||
if (forceCreateWorkunit && (statsToWorkunit || summaryStats)) | ||
throw makeStringException(-1, "Both 'Save stats to workunit' and 'Get summary stats' are not supported for the 'Create Workunit' option"); |
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.
Also perhaps "Neither 'Save stats to workunit' or 'Get summary stats' are supported for the 'Create Workunit' option".
The 'Create Workunit' option should not be available for a queriesOnly roxie. Signed-off-by: wangkx <[email protected]>
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.
@wangkx looks good.
@ghalliday looks like the failure of the Docker smoketest build is not related. Please merge. |
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.
@wangkx a couple of questions.
@@ -311,7 +311,7 @@ function switchInputForm() | |||
</span> | |||
</td> | |||
</tr> | |||
<xsl:if test="$includeRoxieOptions=1"> | |||
<xsl:if test="$includeRoxieOptions=1 or $includeRoxieOptions=2"> |
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.
Should this be != 0? Currently 3 is not included.
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.
The 3 is not included here because it is for a roxie which always runs a published query as a workunit. The 'Save stats to workunit.' option and 'Get summary stats.' option should not give to that roxie. @afishbeck please comment.
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 asked because the code on line 348 will never be processed as it stands.
Also, is the traceLevel check-box still relevant?
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.
The includeRoxieOptions will be set to 3 in the code of esp/services/ws_ecl/ws_ecl_service.cpp for a workunit roxie. In that case, the line 348 will be processed.
Also, is the traceLevel check-box still relevant?
I am not sure. @afishbeck please advise.
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.
Yes, when calling a published query you can tell Roxie the traceLevel to use. I’m not sure if there is an equivalent work unit parameter. As it is now that shouldn’t be exposed when submitting a work unit.
VStringBuffer xpath("queues[@name='%s']", wuinfo.qsetname.get()); | ||
IPropertyTree *queue = getComponentConfigSP()->queryPropTree(xpath.str()); | ||
if (queue && strieq(queue->queryProp("@type"), "roxie")) | ||
xform->setParameter("includeRoxieOptions", queue->getPropBool("@queriesOnly") ? "2" : "3"); |
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.
@afishbeck is this correct. Does queriesOnly imply that you cannot deploy a query? Should it return "1" or "3"?
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.
Deploying a query isn't the right term here.
In k8s we separated out the roxies that would listen on a workunit queue to run workunits.
So for queriesOnly, you can deploy a query and then send it xml/json/testsocket requests. But you can't submit and run workunits.
The opposites is also currently true. Roxie-workunit components are setup like eclagents and you can't deploy queries to them.
Roxie itself supports mixed mode so we could easily change that or make it an option (if the option isn't already there) on the roxie side. We may need a new flag to specify mixed mode in the config so that this code and other places can know the difference though.
@ghalliday sorry, I missed this PR. Should this PR be merged or you have more comment? |
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 will approve.
fe84961
into
hpcc-systems:candidate-9.4.x
The 'Create Workunit' option should not be available for a queriesOnly roxie.
Type of change:
Checklist:
Smoketest:
Testing: