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



##########
File path: 
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala
##########
@@ -69,6 +75,18 @@ class SparkSQLSessionManager private (name: String, spark: 
SparkSession)
       setSession(handle, sessionImpl)
       info(s"$user's session with $handle is opened, current opening sessions" 
+
       s" $getOpenSessionCount")
+
+      if (singleSparkSessionInitialized.compareAndSet(false, true)

Review comment:
       1. We need to move this up to L74 or higher.
   
   2. nit:
   ```scala
   val singleSparkSession = this.conf.get(ENGINE_SINGLE_SPARK_SESSION)
   ```
   3. we can execute `ENGINE_SESSION_INITIALIZE_SQL` once when the engine 
startup instead of hacking here
   




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