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

    https://github.com/apache/spark/pull/2259#discussion_r17268000
  
    --- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala 
---
    @@ -278,6 +300,12 @@ private object SpecialLengths {
     private[spark] object PythonRDD extends Logging {
       val UTF8 = Charset.forName("UTF-8")
     
    +  // remember the broadcasts sent to each worker
    +  private val workerBroadcasts = new mutable.WeakHashMap[Socket, 
mutable.Set[Long]]()
    +  private def getWorkerBroadcasts(worker: Socket) = {
    +    workerBroadcasts.getOrElseUpdate(worker, new mutable.HashSet[Long]())
    --- End diff --
    
    Should this method have synchronization?   I think getWorkerBroadcasts will 
be called from multiple threads.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to