Copilot commented on code in PR #7832:
URL: https://github.com/apache/kyuubi/pull/7832#discussion_r4450679063
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -212,6 +215,20 @@ class BatchJobSubmission(
metadata match {
case Some(metadata) if metadata.peerInstanceClosed =>
setState(OperationState.CANCELED)
+ case Some(metadata)
+ // in case it has been updated by peer kyuubi instance, see
KYUUBI #6278
+ if StringUtils.isNotBlank(metadata.engineState) &&
+
ApplicationState.isTerminated(ApplicationState.withName(metadata.engineState))
=>
Review Comment:
A local batch can persist `PENDING/NOT_FOUND` during startup before its JVM
becomes visible to JPS. If the server then restarts while that application is
running, this branch trusts the stale `NOT_FOUND`, skips the live application
lookup, and marks the batch `FINISHED`. Please only trust persisted `NOT_FOUND`
for backends supporting persisted application state; recovered nonterminal JPS
batches still need a live lookup.
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala:
##########
@@ -322,6 +322,8 @@ class KubernetesApplicationOperation extends
ApplicationOperation with Logging {
}
}
+ override def supportPersistedAppState: Boolean = true
Review Comment:
This 1.10 implementation still reads application status only from
`appInfoStore`, and `markApplicationTerminated` does not persist terminal
information. If retention and cleanup run before the batch's next poll, a
successfully completed application's status is evicted and becomes `NOT_FOUND`,
which this capability now turns into `ERROR`. Please backport the
terminal-state persistence and metastore fallback from #7029 before enabling
this capability, so normal cache eviction does not fail successful batches.
--
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]