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

    https://github.com/apache/spark/pull/9138#discussion_r42302675
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala 
---
    @@ -341,25 +351,36 @@ private[deploy] class Worker(
         }
       }
     
    -  override def receive: PartialFunction[Any, Unit] = {
    -    case RegisteredWorker(masterRef, masterWebUiUrl) =>
    -      logInfo("Successfully registered with master " + 
masterRef.address.toSparkURL)
    -      registered = true
    -      changeMaster(masterRef, masterWebUiUrl)
    -      forwordMessageScheduler.scheduleAtFixedRate(new Runnable {
    -        override def run(): Unit = Utils.tryLogNonFatalError {
    -          self.send(SendHeartbeat)
    -        }
    -      }, 0, HEARTBEAT_MILLIS, TimeUnit.MILLISECONDS)
    -      if (CLEANUP_ENABLED) {
    -        logInfo(s"Worker cleanup enabled; old application directories will 
be deleted in: $workDir")
    +  private def handleRegisterResponse(msg: RegisterWorkerResponse): Unit = 
synchronized {
    --- End diff --
    
    if this is called only from the actor then you don't need synchronized here 
I don't think


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