You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/12/12 06:24:29 UTC

[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #3964: [KYUUBI #3950][FOLLOWUP] Check the batch op state first and set state according to kill message for recovery mode

ulysses-you commented on code in PR #3964:
URL: https://github.com/apache/incubator-kyuubi/pull/3964#discussion_r1045441556


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -298,20 +298,20 @@ class BatchJobSubmission(
 
       MetricsSystem.tracing(_.decCount(MetricRegistry.name(OPERATION_OPEN, opType)))
 
-      if (!builder.processLaunched) {
+      // fast fail
+      if (isTerminalState(state)) {
+        killMessage = (false, s"batch $batchId is already terminal so can not kill it.")
         builder.close()
-        if (recoveryMetadata.isDefined) {
-          killMessage = killBatchApplication()
-        }
-        setState(OperationState.CANCELED)
-        updateBatchMetadata()
         return
       }
 
-      // fast fail
-      if (isTerminalState(state)) {
-        killMessage = (false, s"batch $batchId is already terminal so can not kill it.")
+      // the builder might not be launched for recovery mode
+      if (recoveryMetadata.isEmpty && !builder.processLaunched) {

Review Comment:
   recoveryMetadata.nonEmpty  ?



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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org