You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/08/23 03:31:58 UTC

[GitHub] jihoonson commented on a change in pull request #6206: Fix NPE in KafkaSupervisor.checkpointTaskGroup

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

 ##########
 File path: extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/supervisor/KafkaSupervisor.java
 ##########
 @@ -1127,8 +1147,15 @@ public Boolean apply(KafkaIndexTask.Status status)
                                   );
                                 }
                             );
-                            taskGroupsToVerify.add(taskGroupId);
-                            taskGroup.tasks.putIfAbsent(taskId, new TaskData());
+                            taskGroupsToVerify.put(taskGroupId, taskGroup);
+                            final TaskData prevTaskGroup = taskGroup.tasks.putIfAbsent(taskId, new TaskData());
+                            if (prevTaskGroup != null) {
+                              throw new ISE(
 
 Review comment:
   This should never happen and even if it occurs, the supervisor would kill the task of corresponding `taskId` and respawn the same task. Please check https://github.com/apache/incubator-druid/pull/6206/files/c46d4681c334709caa5cddbd0ce0c67a7d22eaad#diff-6eee87b3aa4eb3a516965fe6e93e25a4L1138.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org