-
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-32945 Add support for queue clients with priorities #19306
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Gavin Halliday <[email protected]>
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32945 Jirabot Action Result: |
Signed-off-by: Gavin Halliday <[email protected]>
Signed-off-by: Gavin Halliday <[email protected]>
05caafa
to
dde7ce4
Compare
There are 3 commits. |
NOTE: I do have code to support a list of priorities per client, but see notes in the JIRA as to why I think that ultimately will not work (without major refactoring) and, as far as I can see, no component has more than one thread listening to a single job queue object. |
A separate question is could this be merged into 9.6.x or 9.8.x. I think the answer should be NO, but HPCC-33030 may depend on it. Maybe that could be implemented poorly (as thor currently does) and then improved once this is merged. |
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 - 1 trivial comment. I was not able to spot any issues though. Looks good.
bool dequeuestop; | ||
bool cancelwaiting; | ||
bool validateitemsessions; | ||
std::atomic<bool> isProcessingDequeue = 0; |
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: = false
//E.g. there is one thread with a minimum priority of 0, and another with a minimum of 100, and an item of | ||
//priority 50 is queued. If the minimum priority of 100 is woken twice nothing will be dequeued. | ||
//Similar problems occur when the clientPriority is mixed. | ||
if (isProcessingDequeue.exchange(true)) |
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 you sleep a tiny amount and try again instead of throwing ?
What is the implication if we throw ?
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, I see comment -
no component has more than one thread listening to a single job queue object.
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 looks good, but its something I am not familiar with so I will approve but really need more time to go over it in more detail.
I did have one general question about dodequeue() throwing and what that means.
Type of change:
Checklist:
Smoketest:
Testing: