karubian commented on code in PR #145:
URL: 
https://github.com/apache/flink-connector-aws/pull/145#discussion_r1670573959


##########
flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/source/enumerator/KinesisStreamsSourceEnumerator.java:
##########
@@ -211,32 +301,33 @@ private void assignSplits(List<KinesisShardSplit> 
discoveredSplits, Throwable th
             throw new KinesisStreamsSourceException("Failed to list shards.", 
throwable);
         }
 
+        splitTracker.addSplits(discoveredSplits);
+        updateLastSeenShardId(discoveredSplits);
+
         if (context.registeredReaders().size() < context.currentParallelism()) 
{
             LOG.info(
                     "Insufficient registered readers, skipping assignment of 
discovered splits until all readers are registered. Required number of readers: 
{}, Registered readers: {}",
                     context.currentParallelism(),
                     context.registeredReaders().size());
-            unassignedSplits.addAll(discoveredSplits);
             return;
         }
 
+        assignSplits();
+    }
+
+    private void assignSplits() {

Review Comment:
   Can we rename this to a name with more context to emphasize the difference 
between enumerator and source reader? 



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

Reply via email to