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

    https://github.com/apache/spark/pull/21114#discussion_r183801936
  
    --- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala ---
    @@ -258,14 +258,8 @@ private[spark] object AccumulatorContext {
        * Returns the [[AccumulatorV2]] registered with the given ID, if any.
        */
       def get(id: Long): Option[AccumulatorV2[_, _]] = {
    -    Option(originals.get(id)).map { ref =>
    -      // Since we are storing weak references, we must check whether the 
underlying data is valid.
    -      val acc = ref.get
    -      if (acc eq null) {
    -        throw new IllegalStateException(s"Attempted to access garbage 
collected accumulator $id")
    -      }
    -      acc
    -    }
    +    val ref = originals.get(id)
    +    Option(if (ref != null) ref.get else null)
    --- End diff --
    
    Added former exception message as a warning.


---

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

Reply via email to