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
Improve pending api to include current executing class #6744
Conversation
the pending tasks api will now include the current executing tasks (with a proper marker boolean flag) this will also help in tests that wait for no pending tasks, to also wait till the current executing task is done closes elastic#6744
@@ -279,7 +279,7 @@ public void run() { | |||
timeInQueue = -1; | |||
} | |||
|
|||
pendingClusterTasks.add(new PendingClusterTask(pending.insertionOrder, pending.priority, new StringText(source), timeInQueue)); | |||
pendingClusterTasks.add(new PendingClusterTask(pending.insertionOrder, pending.priority, new StringText(source), timeInQueue, pending.executing)); |
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.
can we maybe fix this ctor to just take Pending as the first arg?
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.
there are a 2 fields (the source and time in queue) that are computed on top of pending, so it would be confusing I think to pass those on top of pending
left a small comment other than than LGTM.... oh the PR needs labels ;) |
@s1monw put labels, and replied to your comment |
LGTM |
the pending tasks api will now include the current executing tasks (with a proper marker boolean flag) this will also help in tests that wait for no pending tasks, to also wait till the current executing task is done closes #6744
the pending tasks api will now include the current executing tasks (with a proper marker boolean flag)
this will also help in tests that wait for no pending tasks, to also wait till the current executing task is done