changgyoopark-db commented on code in PR #48036:
URL: https://github.com/apache/spark/pull/48036#discussion_r1755193096
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectSessionManager.scala:
##########
@@ -176,21 +173,24 @@ class SparkConnectSessionManager extends Logging {
sessionHolder.foreach(shutdownSessionHolder(_))
}
- private[connect] def shutdown(): Unit = sessionsLock.synchronized {
- scheduledExecutor.foreach { executor =>
- ThreadUtils.shutdown(executor, FiniteDuration(1, TimeUnit.MINUTES))
+ private[connect] def shutdown(): Unit = {
+ sessionsLock.synchronized {
Review Comment:
Thanks for reviewing this! As far as I understand, his comments address a
potential data race between sessionStore and closedSessionsCache, and the data
race can be resolved without relying on this particular lock: not quite related
to this piece of code.
Locking here is to protect scheduledExecutor, and I think that is
self-explanatory at line 55 (@GuardedBy("sessionsLock")).
--
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]