Skip to content

Commit 8865d87

Browse files
jerryshaoAndrew Or
authored and
Andrew Or
committed
[SPARK-12059][CORE] Avoid assertion error when unexpected state transition met in Master
Downgrade to warning log for unexpected state transition. andrewor14 please review, thanks a lot. Author: jerryshao <sshao@hortonworks.com> Closes #10091 from jerryshao/SPARK-12059. (cherry picked from commit 7bc9e1d) Signed-off-by: Andrew Or <andrew@databricks.com>
1 parent f7ae62c commit 8865d87

File tree

1 file changed

+3
-2
lines changed
  • core/src/main/scala/org/apache/spark/deploy/master

1 file changed

+3
-2
lines changed

core/src/main/scala/org/apache/spark/deploy/master/Master.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,9 @@ private[deploy] class Master(
257257
exec.state = state
258258

259259
if (state == ExecutorState.RUNNING) {
260-
assert(oldState == ExecutorState.LAUNCHING,
261-
s"executor $execId state transfer from $oldState to RUNNING is illegal")
260+
if (oldState != ExecutorState.LAUNCHING) {
261+
logWarning(s"Executor $execId state transfer from $oldState to RUNNING is unexpected")
262+
}
262263
appInfo.resetRetryCount()
263264
}
264265

0 commit comments

Comments
 (0)