Hisoka-X commented on code in PR #9736:
URL: https://github.com/apache/seatunnel/pull/9736#discussion_r2302618026


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -468,6 +493,21 @@ public void fetchPendingPartitionSplit() throws 
ExecutionException, InterruptedE
                         split -> {
                             if 
(!assignedSplit.containsKey(split.getTopicPartition())) {
                                 if 
(!pendingSplit.containsKey(split.getTopicPartition())) {
+                                    if (initialized) {
+                                        // For newly discovered partitions, 
set the start offset to
+                                        // start from the earliest
+                                        try {
+                                            split.setStartOffset(
+                                                    listOffsets(

Review Comment:
   The `listOffsets` method does not seem to be a fast operation, and I don't 
think we can do it once per split.



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