Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16220#discussion_r91632463
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
 ---
    @@ -265,31 +278,53 @@ class StreamingQueryManager private[sql] 
(sparkSession: SparkSession) {
           }
           val query = new StreamExecution(
             sparkSession,
    -        name,
    +        userSpecifiedName.orNull,
             checkpointLocation,
             logicalPlan,
             sink,
             trigger,
             triggerClock,
             outputMode)
     
    -      if (activeQueries.values.exists(_.id == query.id)) {
    -        throw new IllegalStateException(
    -          s"Cannot start query with id ${query.id} as another query with 
same id is " +
    -            s"already active. Perhaps you are attempting to restart a 
query from checkpoint" +
    -            s"that is already active.")
    +      activeQueriesLock.synchronized {
    +        if (activeQueries.values.exists(_.id == query.id) || 
pendingQueryIds.contains(query.id)) {
    +          throw new IllegalStateException(
    +            s"Cannot start query with id ${query.id} as another query with 
same id is " +
    +              s"already active. Perhaps you are attempting to restart a 
query from checkpoint" +
    --- End diff --
    
    can you add a extra space at the end? I think i missed the space to 
separate "checkpoint" from "that"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to