Carl-Zhou-CN commented on code in PR #8314:
URL: https://github.com/apache/seatunnel/pull/8314#discussion_r1889650671


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -307,10 +307,13 @@ private Set<KafkaSourceSplit> getTopicInfo() throws 
ExecutionException, Interrup
         }
         log.info("Discovered topics: {}", topics);
         Collection<TopicPartition> partitions =
-                
adminClient.describeTopics(topics).all().get().values().stream()
+                
adminClient.describeTopics(topics).allTopicNames().get().values().stream()
                         .flatMap(
                                 t ->
                                         t.partitions().stream()
+                                                .filter(
+                                                        partitionInfo ->
+                                                                
partitionInfo.leader() != null)

Review Comment:
   > > And what should he do when the partition is restored
   > 
   > After enabling dynamic partition discovery, the next fetch will occur once 
the partition is restored. If it is not enabled, data will only be written to 
partitions with an existing leader. I think this will not negatively impact the 
user.
   
   This easily gives the impression to users that it is executing as expected. 
Should we also provide failure strategies, although it is not mandatory?



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