MartijnVisser commented on code in PR #29308:
URL: https://github.com/apache/flink/pull/29308#discussion_r4125421695


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java:
##########
@@ -247,16 +251,14 @@ protected synchronized SplitFetcher<E, SplitT> 
createSplitFetcher() {
         if (closed) {
             throw new IllegalStateException("The split fetcher manager has 
closed.");
         }
-        // Create SplitReader.
-        SplitReader<E, SplitT> splitReader = splitReaderFactory.get();
-
         int fetcherId = fetcherIdGenerator.getAndIncrement();
         fetchersToShutDown.incrementAndGet();
+        // The fetcher creates its SplitReader on the fetcher thread when it 
starts.

Review Comment:
   If the supplier throws in `getSplitReader()` before `startFetcher` (Kafka's 
`commitOffsets` path), this fetcher stays registered but never runs, so 
`close()` now waits the full `source.reader.close.timeout`. On master it closes 
immediately.



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