@@ -1222,6 +1222,7 @@ trait StandardAsyncExecutionActor
12221222
12231223 // See executeOrRecoverSuccess
12241224 private var missedAbort = false
1225+ // Records whether abort has been requested for this job.
12251226 private var abortRequested = false
12261227 private case class CheckMissedAbort (jobId : StandardAsyncJob )
12271228
@@ -1249,7 +1250,9 @@ trait StandardAsyncExecutionActor
12491250 val executeOrRecoverFuture =
12501251 mode match {
12511252 case Reconnect (jobId : StandardAsyncJob @ unchecked) => reconnectAsync(jobId)
1252- case ReconnectToAbort (jobId : StandardAsyncJob @ unchecked) => reconnectToAbortAsync(jobId)
1253+ case ReconnectToAbort (jobId : StandardAsyncJob @ unchecked) =>
1254+ abortRequested = true
1255+ reconnectToAbortAsync(jobId)
12531256 case Recover (jobId : StandardAsyncJob @ unchecked) => recoverAsync(jobId)
12541257 case _ =>
12551258 tellMetadata(startMetadataKeyValues)
@@ -1454,8 +1457,8 @@ trait StandardAsyncExecutionActor
14541457 retryElseFail(executionHandle)
14551458 case Success (returnCodeAsInt) if continueOnReturnCode.continueFor(returnCodeAsInt) =>
14561459 handleExecutionSuccess(status, oldHandle, returnCodeAsInt)
1457- // Check abort first, but only if abort was requested. There could be a SIGKILL rc (137) for either abort or
1458- // an OOM kill .
1460+ // A job can receive a SIGKILL (137) if it was aborted or OOM killed. Abort must have been requested for this
1461+ // to actually be an abort .
14591462 case Success (returnCodeAsInt) if abortRequested && isAbort(returnCodeAsInt) =>
14601463 Future .successful(AbortedExecutionHandle )
14611464 case Success (returnCodeAsInt) if oomDetected(returnCodeAsInt) && memoryRetryRequested =>
0 commit comments