ConeyLiu commented on a change in pull request #25922: [SPARK-29236][CORE]
Access 'executorDataMap' out of 'DriverEndpoint' should be protected by lock
URL: https://github.com/apache/spark/pull/25922#discussion_r327990008
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
##########
@@ -68,10 +68,10 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
conf.get(SCHEDULER_MAX_REGISTERED_RESOURCE_WAITING_TIME))
private val createTimeNs = System.nanoTime()
- // Accessing `executorDataMap` in `DriverEndpoint.receive/receiveAndReply`
doesn't need any
- // protection. But accessing `executorDataMap` out of
`DriverEndpoint.receive/receiveAndReply`
- // must be protected by `CoarseGrainedSchedulerBackend.this`. Besides,
`executorDataMap` should
- // only be modified in `DriverEndpoint.receive/receiveAndReply` with
protection by
+ // Accessing `executorDataMap` in the inherited methods from
ThreadSafeRpcEndpoint doesn't need
+ // any protection. But accessing `executorDataMap` out of the inherited
methods must be
+ // protected by `CoarseGrainedSchedulerBackend.this`. Besides,
`executorDataMap` should only
+ // be modified in the inherited methods from ThreadSafeRpcEndpoint with
protection by
// `CoarseGrainedSchedulerBackend.this`.
Review comment:
Accessing `executorDataMap` in the inherited methods from
ThreadSafeRpcEndpoint should also be OK.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]