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

    https://github.com/apache/spark/pull/15743#discussion_r86602786
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala ---
    @@ -54,7 +54,12 @@ class TaskInfo(
        * accumulable to be updated multiple times in a single task or for two 
accumulables with the
        * same name but different IDs to exist in a task.
        */
    -  val accumulables = ListBuffer[AccumulableInfo]()
    +  lazy val accumulables: ListBuffer[AccumulableInfo] = 
ListBuffer(_accumulables: _*)
    --- End diff --
    
    Isn't a `def` here the right thing? Otherwise, if `_accumulables` changes 
after this lazy val is evaluated, things will get out of sync.
    
    Or given how the semantics here now are getting pretty weird, maybe 
changing it to an immutable list and just breaking compatibility would be 
better. Then you can just return `_accumulables`.


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