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

    https://github.com/apache/spark/pull/8714#discussion_r39255623
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -278,9 +278,24 @@ private[deploy] class Master(
           execOption match {
             case Some(exec) => {
               val appInfo = idToApp(appId)
    +          val oldState = exec.state
               exec.state = state
    -          if (state == ExecutorState.RUNNING) { appInfo.resetRetryCount() }
    +
    +          if (state == ExecutorState.RUNNING) {
    +            assert(oldState == ExecutorState.LOADING,
    --- End diff --
    
    Is there problem using java-style assertion?
    
    The master will not fail, this exception will be catched by RPC framework. 
I think if RPC framework can assure exact once message delivery and message 
ordering, this assertion will not bring further problems.
    
    With assertion, this issue can also be fixed, but here I added some 
assertions is to make sure state transition is correct.



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