Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-36764

Fix race-condition on "ensure continuous stream is being used" in KafkaContinuousTest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.8, 3.0.3, 3.1.2, 3.2.0
    • 3.2.0
    • Structured Streaming
    • None

    Description

      The test “ensure continuous stream is being used“ in KafkaContinuousTestquickly checks the actual type of the execution, and stop the query. Stopping the streaming query in continuous mode is done by interrupting query execution thread and join indefinitely.

      In parallel, started streaming query is going to generate execution plan, including running optimizer. Some parts of SessionState can be built at that time, as they are defined as lazy. The problem is, some of them seem to be able to “swallow” the InterruptedException and let the thread run continuously.

      That said, the query can’t indicate whether there is a request on stopping query, so the query won’t stop.

      Attachments

        Activity

          People

            kabhwan Jungtaek Lim
            kabhwan Jungtaek Lim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: