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

    https://github.com/apache/flink/pull/3746#discussion_r114795536
  
    --- 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 --
    
    the reason is that the `AbortedReassignmentException` is thrown only if the 
Kafka consumer was `wakeup` before the reassignment started and that wakeup 
effect was consumed by an operation during the reassignment.
    
    Now, if the loop just continues, the next Kafka operation (the `poll`) 
would not be woken up because the wakeup was already consumed.
    So, effectively, it would mean the same thing to do this in the catch block 
instead of falling through the loop:
    ```
    } catch (AbortedReassignmentException e) {
    consumer.wakeup();
    }
    ```
    
    I'm just eagerly continuing instead of restoring the wakeup. Does that make 
sense?


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