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

    https://github.com/apache/spark/pull/20183#discussion_r161154730
  
    --- Diff: 
core/src/main/scala/org/apache/spark/broadcast/BroadcastManager.scala ---
    @@ -52,6 +54,10 @@ private[spark] class BroadcastManager(
     
       private val nextBroadcastId = new AtomicLong(0)
     
    +  private[broadcast] val cachedValues = {
    +    new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK)
    --- End diff --
    
    This is what I found from the doc:
    
    >Hash-based Map implementation that allows mappings to be removed by the 
garbage collector.
    When you construct a ReferenceMap, you can specify what kind of references 
are used to store the map's keys and values. If non-hard references are used, 
then the garbage collector can remove mappings if a key or value becomes 
unreachable, or if the JVM's memory is running low. For information on how the 
different reference types behave, see Reference.
    
    It only mentions that non-hard references can be removed by GC, please 
correct me if I'm wrong.


---

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

Reply via email to