turboFei commented on code in PR #7015:
URL: https://github.com/apache/kyuubi/pull/7015#discussion_r2027930142


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala:
##########
@@ -69,6 +69,16 @@ final class KyuubiTBinaryFrontendService(
           serverContext: ServerContext,
           input: TProtocol,
           output: TProtocol): Unit = {
+        val handle = serverContext.getSessionHandle
+        if (handle != null) {
+          be.sessionManager
+            .getSessionOption(handle)
+            .map(_.asInstanceOf[KyuubiSessionImpl])
+            .flatMap(_.getSessionEvent).foreach { sessionEvent =>
+              sessionEvent.exception = Some(new KyuubiException(
+                s"Session between client and Kyuubi server disconnected 
without closing properly"))

Review Comment:
   We just need to set the session exception.
   
   It would be posted when closing session.
   
   Refer:
   
https://github.com/apache/kyuubi/blob/d6f07a6b64c8ff635335540b82887f4639e14b4b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala#L614-L632



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