yaooqinn commented on a change in pull request #1377:
URL: https://github.com/apache/incubator-kyuubi/pull/1377#discussion_r749942485



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/LaunchEngine.scala
##########
@@ -38,21 +42,19 @@ class LaunchEngine(session: KyuubiSessionImpl, override val 
shouldRunAsync: Bool
   }
 
   override protected def afterRun(): Unit = {
+    if (shouldRunAsync) {
+      waitLaunchEngineComplete()
+    }
     OperationLog.removeCurrentOperationLog()

Review comment:
       register and remove to thread local is just for a code path for writing. 
I think it's safe. If we didn't handle them in pairs, then I guess it's unsafe 
for potential memory leak




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


Reply via email to