kezhuw commented on a change in pull request #13776:
URL: https://github.com/apache/flink/pull/13776#discussion_r519434803



##########
File path: 
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java
##########
@@ -112,7 +111,7 @@ public void accept(Throwable t) {
        public abstract void addSplits(List<SplitT> splitsToAdd);
 
        protected void startFetcher(SplitFetcher<E, SplitT> fetcher) {
-               executors.submit(new ThrowableCatchingRunnable(errorHandler, 
fetcher));
+               executors.submit(fetcher);

Review comment:
       We need error-setting(`errorHandler.accept(t)`) happens-before 
fetcher-removing(`shutdownHook.run()`) so that newly added error-checking 
wouldn't lost it. In order to achieve this, we need move `errorHandler` to 
`SplitFetcher` where `shutdownHook` locates in. After movement, 
`ThrowableCatchingRunnable` is useless.
   
   Besides above semantic changes, I think it would be good to drop extra layer 
between two concurrent components `SourceReaderBase` and `SplitFetcher`. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to