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

    https://github.com/apache/spark/pull/10058#discussion_r46377835
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/api/v1/ExecutorListResource.scala 
---
    @@ -28,9 +28,11 @@ private[v1] class ExecutorListResource(ui: SparkUI) {
       @GET
       def executorList(): Seq[ExecutorSummary] = {
         val listener = ui.executorsListener
    -    val storageStatusList = listener.storageStatusList
    -    (0 until storageStatusList.size).map { statusId =>
    -      ExecutorsPage.getExecInfo(listener, statusId)
    +    listener.synchronized {
    --- End diff --
    
    Because  ExecutorsPage.getExecInfo() use executorToTasksActive, 
executorToTasksFailed of ExecutorsListener and SparkListenerBus thread also 
change value of executorToTasksActive,executorToTasksFailed in onPostEvent() , 
we need to use synchronized there. It is better that synchronized is used in 
ExecutorsPage.getExecInfo().


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