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

    https://github.com/apache/spark/pull/8714#discussion_r39256826
  
    --- 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 --
    
    Yes -- asserts in the JVM are disabled by default! this would not check 
anything then. I checked and it's not what the Scala method does though. 
However the Scala `assert` can be removed at compile time. And it generates an 
`AssertionError` which is extreme for this situation. 
    
    I think that if you intend it to always be present as argument/state 
checking, then `require` is good?


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