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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to