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/11/30 08:53:19 UTC

[GitHub] pzhdfy opened a new pull request #6690: bugfix: when building materialized-view, if taskCount>1, may cause concurrentModificationException

pzhdfy opened a new pull request #6690: bugfix: when building materialized-view, if taskCount>1, may cause concurrentModificationException
URL: https://github.com/apache/incubator-druid/pull/6690
 
 
   In checkSegmentsAndSubmitTasks:
   
   for (Map.Entry<Interval, HadoopIndexTask> entry : runningTasks.entrySet()) {
           Optional<TaskStatus> taskStatus = taskStorage.getStatus(entry.getValue().getId());
           if (!taskStatus.isPresent() || !taskStatus.get().isRunnable()) {
             runningTasks.remove(entry.getKey());
             runningVersion.remove(entry.getKey());
           }
         }
   
   if  taskCount>1, while iterating runningTasks and removing entry from runningTasks will happen  concurrent, this will cause concurrentModificationException.
   
   use ConcurrentHashMap instead HashMap  of  for runningTasks,will fix

----------------------------------------------------------------
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