Ngone51 commented on a change in pull request #24569: [SPARK-23191][CORE] Warn 
rather than terminate when duplicate worker register happens
URL: https://github.com/apache/spark/pull/24569#discussion_r287018239
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
 ##########
 @@ -488,6 +499,16 @@ private[deploy] class Worker(
       logInfo(s"Master with url $masterUrl requested this worker to 
reconnect.")
       registerWithMaster()
 
+    case MasterInRevoking(masterUrl) =>
+      logWarning(s"Master with url $masterUrl is being revoked, current 
active" +
+        s" masterUrl $activeMasterUrl.")
+      if (masterUrl == activeMasterUrl) {
+        registerWithMaster()
 
 Review comment:
   I'm hesitate about this part. Do we really need to `registerWithMaster()` 
when `masterUrl == activeMasterUrl` ? `MasterChanged` haven't come at this 
time, but it will comes soon because Master has been re-elected. What's more, 
it is highly possible that we'll hit *duplicate worker registration* since the 
new leader master is in recovery.
   
   Maybe, we should process this message just like `MasterInStandby` do ? 
   
   We need to think more about it.

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

Reply via email to