spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] tdas commented on a change in pull request #26225: [SPARK-29568][SS] Stop existing running streams when a new stream is launched
Date Tue, 12 Nov 2019 01:45:15 GMT
tdas commented on a change in pull request #26225: [SPARK-29568][SS] Stop existing running
streams when a new stream is launched
URL: https://github.com/apache/spark/pull/26225#discussion_r344397445
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
 ##########
 @@ -343,7 +343,10 @@ class StreamingQueryManager private[sql] (sparkSession: SparkSession)
extends Lo
       trigger,
       triggerClock)
 
-    activeQueriesLock.synchronized {
+    // The following code block checks if a stream with the same name or id is running. Then
it
+    // returns an Option of an already active stream to stop outside of the lock
+    // to avoid a deadlock.
+    val activeDuplicateQuery = activeQueriesLock.synchronized {
 
 Review comment:
   or directly use `sharedState.activeQueryLock`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message