becketqin commented on PR #25340: URL: https://github.com/apache/flink/pull/25340#issuecomment-2427417285
@kimgr Sorry for the late reply. And thanks for the patch. The patch itself looks good to me. Usually, a test needs to be added to verify the bug is actually fixed. For race conditions like this the unit test can be a little tricky to write. What I usually do is just running the sequence for something like 1000 times and make sure there is no occasional failure anymore. So in this case, I think we can repeat the following sequence in a unit test for 1000 times: 1. create a `SingleThreadFetcherManager`. 2. add a new split. 3. close the fetcher manager without waiting. 4. add a new split. That said, I still don't quite understand why a split will be assigned after the SourceReader is closing. But I don't think the fix will cause problem because the SourceReader is shutdown anyways when this race condition happens. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org