Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/4915#discussion_r147652455
--- Diff:
flink-connectors/flink-connector-kafka-0.11/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer011.java
---
@@ -483,11 +478,6 @@ public void setLogFailuresOnly(boolean
logFailuresOnly) {
*/
@Override
public void open(Configuration configuration) throws Exception {
- if (semantic != Semantic.NONE && !((StreamingRuntimeContext)
this.getRuntimeContext()).isCheckpointingEnabled()) {
--- End diff --
`initializeState()` performs some clean up actions that depends on the
semantic - cleaning up/closing lingering transactions, thus this check should
happen earlier. Otherwise `EXACTLY_ONCE` cleaning up code would be executed
unnecessarily.
---