Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5991#discussion_r190152570
  
    --- Diff: 
flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/KafkaConsumerThread.java
 ---
    @@ -374,8 +385,8 @@ void setOffsetsToCommit(
         * <p>This method is exposed for testing purposes.
         */
        @VisibleForTesting
    -   void reassignPartitions(List<KafkaTopicPartitionState<TopicPartition>> 
newPartitions) throws Exception {
    -           if (newPartitions.size() == 0) {
    +   void reassignPartitions(List<KafkaTopicPartitionState<TopicPartition>> 
newPartitions, Set<TopicPartition> partitionsToBeRemoved) throws Exception {
    --- End diff --
    
    I have the feeling that this method is way too complex now, to a point that 
it might make more sense to break this up into 2 different methods - 
`addPartitionsToAssignment` and `removePartitionsFromAssignment`.


---

Reply via email to