HeartSaVioR opened a new pull request #34004:
URL: https://github.com/apache/spark/pull/34004


   ### What changes were proposed in this pull request?
   
   The test “ensure continuous stream is being used“ in KafkaContinuousTest 
quickly checks the actual type of the execution, and stops the query. Stopping 
the streaming query in continuous mode is done by interrupting query execution 
thread and join with indefinite timeout.
   
   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 
“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.
   
   This PR fixes such scenario via ensuring that streaming query has started 
before the test stops the query.
   
   ### Why are the changes needed?
   
   Race-condition could end up with test hang till test framework marks it as 
timed-out.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing tests.


-- 
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]

Reply via email to