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

    https://github.com/apache/spark/pull/23083#discussion_r235314949
  
    --- Diff: core/src/main/scala/org/apache/spark/TaskContextImpl.scala ---
    @@ -99,6 +99,13 @@ private[spark] class TaskContextImpl(
         this
       }
     
    +  override def remoteTaskCompletionListener(listener: 
TaskCompletionListener)
    +      : this.type = synchronized {
    +    onCompleteCallbacks -= listener
    --- End diff --
    
    Should we do the same thing (i.e. chaning ArrayBuffer to LinkedHashSet) for 
onFailureCallbacks too?
    ```scala
      /** List of callback functions to execute when the task completes. */
      @transient private val onCompleteCallbacks = new 
ArrayBuffer[TaskCompletionListener]
    
      /** List of callback functions to execute when the task fails. */
      @transient private val onFailureCallbacks = new 
ArrayBuffer[TaskFailureListener]
    ```


---

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

Reply via email to