ruanwenjun commented on code in PR #7294:
URL: https://github.com/apache/kyuubi/pull/7294#discussion_r2659261435


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala:
##########
@@ -180,6 +180,11 @@ class KyuubiSessionImpl(
             _engineSessionHandle =
               engineClient.openSession(protocol, user, passwd, 
openEngineSessionConf)
             _client = engineClient
+            // Since the _client might be null when we close session
+            // so we need to check isClosed here

Review Comment:
   > Q: if `_engine` is null, how can code go here? NPE should be thrown at L181
   
   Sorry, I'm not sure if I understand. Are you referring to `engineClient` 
being null or _client being null? If the code has not yet reached line 182, 
_client will be null at this point, then close session will find the _client 
still null and will not close it.



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