pan3793 commented on a change in pull request #857:
URL: https://github.com/apache/incubator-kyuubi/pull/857#discussion_r677951508
##########
File path:
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala
##########
@@ -59,6 +63,17 @@ class SparkSQLSessionManager private (name: String, spark:
SparkSession)
spark.newSession()
}
+ if (singleSparkSessionInitialized.compareAndSet(false, true)
Review comment:
no, `compareAndSet(expect = false, update = true)` only return `true` in
first round, but the if statement break the semantic of
`singleSparkSessionInitialized ` here, it should be
```
if (!this.conf.get(ENGINE_SINGLE_SPARK_SESSION)) ||
singleSparkSessionInitialized.compareAndSet(false, true))
```
anyway, removed `singleSparkSessionInitialized` and partial move the init
logic to engine startup
--
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]