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

    https://github.com/apache/spark/pull/3781#discussion_r22248980
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
 ---
    @@ -31,16 +31,17 @@ private[spark] class SparkDeploySchedulerBackend(
       with AppClientListener
       with Logging {
     
    -  var client: AppClient = null
    -  var stopping = false
    -  var shutdownCallback : (SparkDeploySchedulerBackend) => Unit = _
    -  @volatile var appId: String = _
    +  private var client: AppClient = null
    +  private var stopping = false
    +  private val shutdownCallbackLock = new Object()
    +  private var shutdownCallback : (SparkDeploySchedulerBackend) => Unit = _
    +  @volatile private var appId: String = _
     
    -  val registrationLock = new Object()
    -  var registrationDone = false
    +  private val registrationLock = new Object()
    --- End diff --
    
    On the one hand, this sounds like it could be an `AtomicBoolean`. On 
another hand -- this whole mechanism could be replaced by something more robust 
in `java.util.concurrent`


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