StephanEwen commented on a change in pull request #13344:
URL: https://github.com/apache/flink/pull/13344#discussion_r486660080



##########
File path: 
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/SourceReaderBase.java
##########
@@ -99,67 +106,94 @@ public SourceReaderBase(
                this.splitFetcherManager = splitFetcherManager;
                this.recordEmitter = recordEmitter;
                this.splitStates = new HashMap<>();
-               this.splitIter = null;
                this.options = new SourceReaderOptions(config);
                this.config = config;
                this.context = context;
                this.noMoreSplitsAssignment = false;
        }
 
        @Override
-       public void start() {
-
-       }
+       public void start() {}
 
        @Override
        public InputStatus pollNext(ReaderOutput<T> output) throws Exception {
                splitFetcherManager.checkErrors();
-               // poll from the queue if the last element was successfully 
handled. Otherwise
-               // just pass the last element again.
-               RecordsWithSplitIds<E> recordsWithSplitId = null;
-               boolean newFetch = splitIter == null || !splitIter.hasNext();
-               if (newFetch) {
-                       recordsWithSplitId = elementsQueue.poll();
+
+               // make sure we have a fetch we are working on, or move to the 
next

Review comment:
       Thanks :-)
   




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