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

    https://github.com/apache/spark/pull/1542#discussion_r15392537
  
    --- Diff: core/src/main/scala/org/apache/spark/MapOutputTracker.scala ---
    @@ -162,9 +164,9 @@ private[spark] abstract class MapOutputTracker(conf: 
SparkConf) extends Logging
               logInfo("Got the output locations")
               mapStatuses.put(shuffleId, fetchedStatuses)
             } finally {
    -          fetching.synchronized {
    -            fetching -= shuffleId
    -            fetching.notifyAll()
    +          monitor.synchronized {
    +            fetching.remove(shuffleId)
    +            monitor.notifyAll()
    --- End diff --
    
    The read/write operation of `fetching` should use the same monitor 
according to the java memory model.
    
    > In addition, using the monitor of an object from outside to synchronized 
makes it hard to analyse the codes because the monitor of this object may be 
used (or used in the future) in other place and the developer may not notice 
somebody has already used it here.
    
    Also this problem looks hard to solve. 


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

Reply via email to