hutiefang76 commented on code in PR #7521:
URL: https://github.com/apache/kyuubi/pull/7521#discussion_r3564492887


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionManager.scala:
##########
@@ -338,11 +337,38 @@ class KyuubiSessionManager private (name: String) extends 
SessionManager(name) {
           getBatchMetadata(batchId)
             .filter(m =>
               m.kyuubiInstance == kyuubiInstance && 
batchStatesToRecovery.contains(m.opState))
-            .flatMap { metadata => 
Some(createBatchSessionFromRecovery(metadata)) }
+            .flatMap(createBatchSessionFromRecoverySafely)
       }
     }
   }
 
+  private def createBatchSessionFromRecoverySafely(
+      metadata: Metadata): Option[KyuubiBatchSession] = {
+    metadata.requestConf.collectFirst { case (key, null) => key } match {

Review Comment:
   Yes. I documented the history and affected versions in the PR description 
and verified them from the repository tags: batch-session recovery was 
introduced by KYUUBI #2373 (first released in 1.6.0-incubating), while Batch 
API V2 was introduced by #4790 (first released in 1.8.0). The reported V2 
recovery failure is therefore confirmed for 1.8.0+ and current master. #6884 
later added the explicit batch-reassignment recovery path; the helper in this 
PR guards both normal startup recovery and that reassignment path.



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