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

    https://github.com/apache/spark/pull/13211#discussion_r64142098
  
    --- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala ---
    @@ -437,7 +438,9 @@ class ListAccumulator[T] extends AccumulatorV2[T, 
java.util.List[T]] {
           s"Cannot merge ${this.getClass.getName} with 
${other.getClass.getName}")
       }
     
    -  override def value: java.util.List[T] = 
java.util.Collections.unmodifiableList(_list)
    +  override def value: java.util.List[T] = _list.synchronized {
    +    java.util.Collections.unmodifiableList(new ArrayList[T](_list))
    --- End diff --
    
    I think so. Allowing users modifying the list seems not a good idea.


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