Check allocationIdOnLastStatusUpdate when trying to detect whether a task is stale.

This commit is contained in:
Martijn van Groningen 2017-03-28 14:55:50 +02:00
parent b142d7e29c
commit 78b844e79b
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
* to a new executor node and the status hasn't been updated then the task status is stale.
*/
public boolean isCurrentStatus() {
return allocationIdOnLastStatusUpdate == allocationId;
return allocationIdOnLastStatusUpdate != null && allocationIdOnLastStatusUpdate == allocationId;
}
@Override