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

    https://github.com/apache/spark/pull/4021#discussion_r22889431
  
    --- Diff: core/src/main/scala/org/apache/spark/Accumulators.scala ---
    @@ -320,7 +328,12 @@ private[spark] object Accumulators {
       def add(values: Map[Long, Any]): Unit = synchronized {
         for ((id, value) <- values) {
           if (originals.contains(id)) {
    -        originals(id).asInstanceOf[Accumulable[Any, Any]] ++= value
    +        // Since we are now storing weak references, we must check whether 
the underlying data
    +        // is valid. 
    +        originals(id).get match {
    +          case Some(accum) => accum.asInstanceOf[Accumulable[Any, Any]] 
++= value
    +          case None => // Do nothing   
    --- End diff --
    
    Should this be an error-case?  This seems to mean that you've received an 
accumulator update for an accumulator that's been garbage-collected, which 
seems like it should be an error.


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