Skip to content

fix RemoteTaskRunner terminating lazy workers below autoscaler minNumWorkers value#5310

Merged
leventov merged 2 commits intoapache:masterfrom
metamx:remote-task-runner-fix
Feb 1, 2018
Merged

fix RemoteTaskRunner terminating lazy workers below autoscaler minNumWorkers value#5310
leventov merged 2 commits intoapache:masterfrom
metamx:remote-task-runner-fix

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Currently, the markWorkersLazy method of RemoteTaskRunner will incorrectly mark all lazy workers as lazy when the maxWorkers parameter is 0. This is the case where current workers are lazy, yet required to satisfy the autoscaler minNumWorkers setting, which results in all lazy workers being killed every idle timeout, and replaced immediately, indefinitely or until at least minNumWorkers are no longer considered lazy.

@Override
public Collection<Worker> markWorkersLazy(Predicate<ImmutableWorkerInfo> isLazyWorker, int maxWorkers)
{
if (maxWorkers < 1) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add comment in code.

Copy link
Copy Markdown
Member

@nishantmonu51 nishantmonu51 left a comment

Choose a reason for hiding this comment

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

👍

@leventov leventov merged commit 1fffc68 into apache:master Feb 1, 2018
@leventov leventov deleted the remote-task-runner-fix branch February 1, 2018 16:57
gianm pushed a commit to gianm/druid that referenced this pull request Feb 2, 2018
…Workers value (apache#5310)

* fix RemoteTaskRunner terminating lazy workers below autoscaler minNumWorkers value

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants