turboFei commented on code in PR #2849:
URL: https://github.com/apache/incubator-kyuubi/pull/2849#discussion_r894171248


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala:
##########
@@ -161,8 +164,10 @@ class KyuubiSyncThriftClient private (
       case e: Exception =>
         throw KyuubiSQLException("Error while cleaning up the engine 
resources", e)
     } finally {
-      Option(engineAliveThreadPool).foreach(_.shutdown())
-      if (_aliveProbeSessionHandle != null && !remoteEngineBroken) {
+      Option(engineAliveThreadPool).foreach { pool =>
+        ThreadUtils.shutdown(pool, Duration(engineAliveProbeInterval, 
TimeUnit.MILLISECONDS))

Review Comment:
   engineAliveProbeInterval is also the requestTimeout of the alive probe 
thrift client.
   
   ```
             createTProtocol(user, passwd, host, port, aliveProbeInterval, 
loginTimeout),
   ```



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