Skip to content

MSQ: Launch initial tasks faster.#13393

Merged
kfaraz merged 2 commits intoapache:masterfrom
gianm:msq-launch-initial-tasks-faster
Nov 21, 2022
Merged

MSQ: Launch initial tasks faster.#13393
kfaraz merged 2 commits intoapache:masterfrom
gianm:msq-launch-initial-tasks-faster

Conversation

@gianm
Copy link
Contributor

@gianm gianm commented Nov 21, 2022

Notify the mainLoop thread to skip a sleep when the desired task count changes.

Notify the mainLoop thread to skip a sleep when the desired task
count changes.
@gianm gianm added the Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 label Nov 21, 2022
Copy link
Contributor

@cryptoe cryptoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !!

// wait on taskIds so we can wake up early if needed.
synchronized (taskIds) {
taskIds.wait(sleepMillis);
if (acknowledgedDesiredTaskCount == desiredTaskCount) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Can we add a note here. Something like :
As desiredTaskCount can change in launchTasksIfNeeded which can be called externally from any thread, we need to way to wake up the main loop in case desiredTaskCount is changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, added!

@kfaraz kfaraz added this to the 25.0 milestone Nov 21, 2022
@kfaraz kfaraz merged commit f037776 into apache:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants