JingGe commented on pull request #17888:
URL: https://github.com/apache/flink/pull/17888#issuecomment-987717228


   @AHeise thanks for the hot-looping suggestion. I got that setup done on my 
local machine except the azure-pipelines that could only be done in the CI 
server. After looking into the logs, found that, while using TableEnvironment 
in the ITCase, a Flink MiniCluster will be started/stopped automatically in the 
background for each query. Since the shutdown of the MiniCluster will be called 
asynchronously, CollectResultFetcher will get data lost sometimes based on race 
conditions and the unchecked RuntimeException java.lang.IllegalStateException 
will be thrown that we were not aware of.
   
   The solution is to control the lifecycle of the MiniCluster manually in this 
test. The MiniClusterWithClientResource could be a good fit in this case, which 
will be started and stopped at class level. The race conditions are therefore 
solved.


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


Reply via email to