loserwang1024 commented on code in PR #4388:
URL: https://github.com/apache/flink-cdc/pull/4388#discussion_r3201113355


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/reader/external/IncrementalSourceStreamFetcher.java:
##########
@@ -282,6 +283,10 @@ private void configureFilter() {
         this.pureStreamPhaseTables.clear();
     }
 
+    public void startReadTask() {
+        this.currentTaskRunning = true;
+    }
+
     public void stopReadTask() throws Exception {
         this.currentTaskRunning = false;

Review Comment:
   I think a  `private volatile AtomicInteger counter = new AtomicInteger(0)` 
to count the running job will be better for the thread model.
   
   Though currentTaskRunning is also work because executorService is 
SingleThreadExecutor, use counter will be better for later multiple thread 
pools.



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