jihoonson commented on a change in pull request #6206: Fix NPE in 
KafkaSupervisor.checkpointTaskGroup
URL: https://github.com/apache/incubator-druid/pull/6206#discussion_r212173409
 
 

 ##########
 File path: 
extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/supervisor/KafkaSupervisor.java
 ##########
 @@ -1984,8 +2028,12 @@ private boolean isTaskCurrent(int taskGroupId, String 
taskId)
 
     final List<ListenableFuture<Void>> futures = Lists.newArrayList();
     for (Map.Entry<String, TaskData> entry : taskGroup.tasks.entrySet()) {
-      if (!entry.getValue().status.isComplete()) {
-        futures.add(stopTask(entry.getKey(), false));
+      final String taskId = entry.getKey();
+      final TaskData taskData = entry.getValue();
+      if (taskData.status == null) {
+        killTask(taskId);
 
 Review comment:
   The null `taskData.status` means that the supervisor hasn't updated it yet, 
so its actual status can be anything. I think this should kill tasks if their 
status are unknown because this method is supposed to stop all tasks in the 
given taskGroup.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to