HeartSaVioR commented on a change in pull request #26018:
[SPARK-29352][SQL][SS] Track active streaming queries in the
SparkSession.sharedState
URL: https://github.com/apache/spark/pull/26018#discussion_r333997947
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
##########
@@ -355,7 +355,7 @@ class StreamingQueryManager private[sql] (sparkSession:
SparkSession) extends Lo
// Make sure no other query with same id is active across all sessions
val activeOption =
Option(sparkSession.sharedState.activeStreamingQueries.putIfAbsent(query.id,
this))
- if (activeOption.isDefined) {
+ if (activeOption.isDefined || activeQueries.values.exists(_.id ==
query.id) {
Review comment:
Just curious: are you seeing the actual case where activeOption is None but
activeQueries contain such query? I'm not seeing the case, though I don't think
adding this would hurt.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]