Github user ksakellis commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3711#discussion_r22681441
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala
 ---
    @@ -344,12 +354,20 @@ private[spark] class MesosSchedulerBackend(
     
       override def frameworkMessage(d: SchedulerDriver, e: ExecutorID, s: 
SlaveID, b: Array[Byte]) {}
     
    +  /**
    +   * Remove executor associated with slaveId in a thread safe manner.
    +   */
    +  private def removeExecutor(slaveId: String) = {
    +    synchronized {
    --- End diff --
    
    Yes, it is non-consistent. The synchronized block was just carried over 
from the previous code. We could probably use SynchronizedSet to prevent 
concurrentmodification exceptions. There is a synchronized {} in statusUpdate 
to try to ensure atomicity modifying slaveIdsWithExecutors and taskIdToSlaveId 
but that isn't enough since slaveIdsWithExecutors is modified in a number of 
places.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to