Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/5200#discussion_r160112834
--- Diff:
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
---
@@ -559,6 +565,7 @@ public void onException(Throwable cause) {
// the fetchers 'snapshotCurrentState()' method
return at least
// the restored offsets
this.kafkaFetcher = fetcher;
+ this.kafkaOffsetCommitter = createOffsetCommitter();
--- End diff --
Changing order of those lines:
```
this.kafkaFetcher = fetcher;
this.kafkaOffsetCommitter = createOffsetCommitter();
```
will brake the code. This is super fragile and is kind of hard to follow.
---