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


##########
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:
   Thanks for clarifying. I reworked the patch around creation-time filtering 
in 34dcff8a0:
   
   - The REST boundary removes null-valued entries before user/batch-id lookup 
and V2 metadata persistence.
   - The shared createBatchSession boundary sanitizes both the configuration 
and attached metadata, so legacy INITIALIZED submission and PENDING/RUNNING 
recovery are covered as well.
   - The previous broad recovery catch/ERROR transition was removed; unrelated 
recovery failures keep their existing behavior.
   
   I added separate tests for REST persistence, INITIALIZED submission, and 
recovery. The targeted lifecycle suite passes 2/2; the new REST test passes in 
both V1 and V2 suites. I also documented the full test evidence, including the 
two unrelated Spark log-fixture failures reproduced on clean origin/master, in 
the PR description.



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