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

    https://github.com/apache/flink/pull/3746#discussion_r114803295
  
    --- Diff: 
flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/KafkaConsumerThread.java
 ---
    @@ -219,6 +209,15 @@ public void run() {
                                        }
                                }
     
    +                           try {
    +                                   newPartitions = 
unassignedPartitionsQueue.pollBatch();
    +                                   if (newPartitions != null) {
    +                                           
reassignPartitions(newPartitions);
    +                                   }
    +                           } catch (AbortedReassignmentException e) {
    +                                   continue;
    --- End diff --
    
    One extra remark:
    
    the external `wakeup` call was intended to un-block the main thread from 
any Kafka blocking operation, and commit offsets as soon as possible (which 
happens at the start of the loop). It's also for making sure that the main 
thread stops work as soon as possible so that there isn't any strange long job 
shutdown issues (which occurred before).
    
    Hence it's important to restore effective wakeup calls (or mimic their 
behaviour) and fall through the loop when an external operation did call wakeup.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to