-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix NPE in TaskLockbox that prevents overlord leadership #6512
Conversation
…that provides indexing task type is not loaded
TaskLockbox
that prevents overlord leadershipThere 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.
LGTM with a nit.
@@ -183,7 +183,7 @@ public void setStatus(TaskStatus status) | |||
try { | |||
final ImmutableList.Builder<Task> listBuilder = ImmutableList.builder(); | |||
for (final TaskStuff taskStuff : tasks.values()) { | |||
if (taskStuff.getStatus().isRunnable()) { | |||
if (taskStuff.getStatus().isRunnable() && taskStuff.getTask() != null) { |
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 guess task
is never null in HeapMemoryTaskStorage?
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.
Good point 👍
@clintropolis could you backport this to 0.13.0-incubating? |
* fix NPE that prevents overlord from assuming leadership if extension that provides indexing task type is not loaded * heh
apache#6564) * fix NPE that prevents overlord from assuming leadership if extension that provides indexing task type is not loaded * heh
This error prevents the overlord from assuming leadership if extension that provides indexing task related jackson modules is not loaded, causing errors such as
accompanied by:
This is done by filtering out
null
results from the list returned by implementations ofTaskStorage.getActiveTasks
, which are now treated as not active I guess since there is nothing we can do with them.