Skip to content

Fix NPE in RemoteTaskRunner when some tasks in ZooKeeper but not in Overlord - #5511

Merged
jon-wei merged 2 commits into
apache:masterfrom
jihoonson:fix-5506
Apr 4, 2018
Merged

jon-wei merged 2 commits into
apache:masterfrom
jihoonson:fix-5506

Conversation

@jihoonson

@jihoonson jihoonson commented Mar 20, 2018

Copy link
Copy Markdown
Contributor

Fixes #5506.


This change is Reviewable

@jihoonson jihoonson added the Bug label Mar 20, 2018
@clintropolis

Copy link
Copy Markdown
Member

👍 We should call out in release notes that there will be a small per task increase in the amount of data stored in zookeeper.

zkWorker.getWorker(),
TaskLocation.unknown(),
runningTasks.get(taskId).getDataSource()
announcement.getTaskDataSource()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the task has already been shutdown, will this make it start back up again?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess there's already a "we'll add it if we don't know about it" thing immediately below, so the check must be elsewhere.

@drcrallen

Copy link
Copy Markdown
Contributor

@jihoonson can you record in this PR where that assurance is made... prior shutdown tasks should be terminated instead of added to the active queue. I forget where it is and its not easy to find.

@jihoonson

jihoonson commented Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

@drcrallen if you mean TaskQueue by the active queue, TaskQueue is a waiting queue for tasks. When a task becomes ready, it calls TaskRunner.run() to run a task. Once a task is added to TaskRunner, it isn't added back to TaskQueue.

When the remoteTaskRunner sees an unknown prior shutdown task, it adds the task to its runningTasks (https://github.com/druid-io/druid/blob/master/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java#L966-L983) and immediately completes that task (https://github.com/druid-io/druid/blob/master/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java#L994-L996).

@jihoonson

Copy link
Copy Markdown
Contributor Author

there will be a small per task increase in the amount of data stored in zookeeper.

@clintropolis thanks for the review. This also sounds good.

@jon-wei

jon-wei commented Apr 2, 2018

Copy link
Copy Markdown
Contributor

@drcrallen did you have any more comments on this PR?

@jon-wei
jon-wei merged commit 7239f56 into apache:master Apr 4, 2018
@jihoonson jihoonson added this to the 0.12.1 milestone Apr 9, 2018
@jihoonson jihoonson removed this from the 0.12.1 milestone Apr 23, 2018
gianm pushed a commit to implydata/druid-public that referenced this pull request Jul 5, 2018
…verlord (apache#5511)

* Fix NPE in RemoteTaskRunner when some tasks in ZooKeeper but not in Overlord

* revert unnecessary change
@jihoonson jihoonson added this to the 0.13.0 milestone Jul 5, 2018
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
…verlord (apache#5511)

* Fix NPE in RemoteTaskRunner when some tasks in ZooKeeper but not in Overlord

* revert unnecessary change
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.

5 participants