-
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-32964 Add a Roxie Background priority queue #19290
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32964 Jirabot Action Result: |
9680d8d
to
b0c6f2b
Compare
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 think this is ok, other than the comment re clarity. The -1 vs 3 translation is a bit clunky but I'm not sure what would be better.
This PR is not intended to include automatic routing to the BG queue ever, I assume?
if ((colocalArg == 0) && // not a child query activity?? | ||
(p->queryHeader().activityId & (ROXIE_SLA_PRIORITY | ROXIE_HIGH_PRIORITY)) && | ||
(pmask && (pmask != ROXIE_PRIORITY_MASK)) && |
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.
You only want to request fastlane for SLA/HIGH. This code might do that, but it took me several reads of it to be sure. Can it be coded more clearly?
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.
ok.
pmask != 0 => its SLA, HIGH or BG
pmask != ROXIE_PRIORITY_MASK => its not BG
I agree I think we can remove the explicit BG queue time limits because this BG queue will not be something one can publish a query to, but rather a queue for dynamically submitting to. |
7e079d2
to
184fd69
Compare
dc51187
to
6a17ea1
Compare
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.
@mckellyln looks good. Some very minor comments.
roxie/ccd/ccdqueue.cpp
Outdated
@@ -162,6 +162,7 @@ StringBuffer &RoxiePacketHeader::toString(StringBuffer &ret) const | |||
case ROXIE_SLA_PRIORITY: ret.append("SLA"); break; | |||
case ROXIE_HIGH_PRIORITY: ret.append("HIGH"); break; | |||
case ROXIE_LOW_PRIORITY: ret.append("LOW"); break; | |||
case ROXIE_SLA_PRIORITY + ROXIE_HIGH_PRIORITY: ret.append("BG"); break; |
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: Add an ROXIE_BG_PRIORITY constant.
roxie/ccd/ccdqueue.cpp
Outdated
hiQueue.enqueue(packet, IBYTIdelay); | ||
else | ||
loQueue.enqueue(packet, IBYTIdelay); | ||
switch(header.activityId & ROXIE_PRIORITY_MASK) |
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: Normally have a space after a switch keyword (same below)
if ((colocalArg == 0) && // not a child query activity?? | ||
(p->queryHeader().activityId & (ROXIE_SLA_PRIORITY | ROXIE_HIGH_PRIORITY)) && | ||
(pmask && (pmask != (ROXIE_SLA_PRIORITY + ROXIE_HIGH_PRIORITY))) && |
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.
minor: Compare explicitly against ROXIE_LOW_PRIORITY rather than implicitly, and use a new constant for background.
be6c0d1
to
a61b416
Compare
Updated for re-review. |
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 think it looks good to me.
There would be scope for refactoring to use some arrays/avoid some of the switch statements, but unlikely to be worth the upheaval.
Signed-off-by: M Kelly <[email protected]>
Squashed. |
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.
Looks good
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: