pan3793 commented on code in PR #7489:
URL: https://github.com/apache/kyuubi/pull/7489#discussion_r3345591723


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -195,6 +195,13 @@ class BatchJobSubmission(
       withOperationLog(error(s"Batch $batchId state is $opState," +
         s" but the application state is $appState and not terminated, set to 
UNKNOWN."))
       ApplicationState.UNKNOWN
+    } else if (opState == OperationState.CANCELED && 
!ApplicationState.isTerminated(appState)) {
+      // A canceled batch has had its application killed, so the last-polled 
application state
+      // (e.g. RUNNING) is stale. Without reconciling it, this stale state 
would be persisted and
+      // reported by the REST API forever, since polling stops once the 
operation is closed.
+      withOperationLog(info(s"Batch $batchId state is $opState," +
+        s" but the application state is $appState and not terminated, set to 
KILLED."))
+      ApplicationState.KILLED

Review Comment:
   the ERROR => UNKNOWN is a defensive inference, how do we confidently infer 
KILLED  for CANCELED op? is it possible to query it from the resource manager?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to